I have a list filled with values and a list with questions, some elements in the value list have more than 1 element, so for example
question[2] = Light
question[3] = Toppings
value[2] = on / off
value[3] = cheese / peppers / oranges / apples
(i split these values on " / ")
now i want use buttons in place for values , for every single question and value in the lists.
is this possible and if yes what is the best approach to create such a layout?
If you list is static and small you way consider creating same using the simple layout, using
textview
for the questions andbuttons
for the values.Or
You can use the
recyclerview
withGridLayoutManager
ans set the column count dynamically as shown here .