We have a small form in our application (maybe 3-4 'screens' high) which is mostly non-repeating in nature as it's comprised of several different types of rows/cells which the user must answer, then there's a 'Sign Up' button down at the bottom.
What I'm wondering is if it's bad to use a LinearLayout inside of a ScrollView for this instead of the RecyclerView.
I understand if you have a lot of rows of repeating data, then it absolutely makes more sense to use the RecyclerView to optimize the UI's performance, but in this case, we're only talking about maybe 20-25 'rows' of data (again, maybe 3-4 'screen-fulls' when scrolled) and most are unique and not repeating in nature so being able to simply declare them declaratively in the layout file really simplifies things. No RecyclerView Adapters, ViewHolders, nothing. Just a simple layout.
So is this considered bad practice? Are there any technical down-sides to this asides from the cells are always in-memory and not reused?
What I'm wondering is if it's bad to use a LinearLayout inside of a ScrollView for this instead of the RecyclerView.
No, that's fine. Whether a LinearLayout
itself is the correct answer (instead of a ConstraintLayout
or TableLayout
or something else) is a separate issue. But using a conventional layout wrapped in a ScrollView
is fine. RecyclerView
becomes advantageous when you have lots of rows and recycling can happen. In your case, while there may be enough rows to justify RecyclerView
, if the rows cannot be recycled, there is little point.