TableLayout Vs Recycler View?

I am developing an Android application that will allow users to create polls. The user can create a question and provide a set of parameters.

I would like to provide a feature in which users can dynamically add or remove parameters.

I can’t decide which layout will be better.

TableLayout - Each row may contain an option. Vs RecyclerView - each item can be an option.

(Note that each option will actually be a ViewText View, where the user must enter the contents of the option.)

I have seen people usually use RecyclerView for very large datasets, but for my use case, the user can add a maximum of 5 or 6 parameters. In addition, I will use recycling to collect data. For such a use case, is it a good option to use RecyclerView or something else?

Please provide suggestions

+4
source share
2 answers

Definitely a RecyclerView .
With the help of RecyclerViewyou can easily add and remove items dynamically.

Use TableLayoutif you have a static number of strings ( TableRow) that you declare in XML.

+4

RecyclerView, (5 6). , .

+1

Source: https://habr.com/ru/post/1669280/


All Articles