I am developing an android app which will allow users to create polls. A user can create a question and provide a set of options.
I wanted to provide a feature in which users can add or remove options dynamically.
I can't decide which layout would be best.
TableLayout - Each row can contain an option. Vs RecyclerView - Each item can be an option.
(Note that each option actually would be an EditText View where the user has to enter the option content.)
I have seen people generally use the RecyclerView for very large data sets but for my use case, a user can add a maximum of 5 or 6 options. Apart from that, I'll be using a recycler view to collect the data. For such a use case, is it a good option to use the RecyclerView or something else?
Please provide suggestions
Use RecyclerView even if your rows are such little (5 or 6). By doing that, you will facilitate navigation for user with just one screen.
Definitely RecyclerView.
With a RecyclerView
you can easily add and remove items dynamically.
Use the TableLayout
if you have a static amount of rows (TableRow
), that you declare in XML.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With