Android; Dynamic buttons layout

50 views Asked by At

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?

full example: enter image description here

1

There are 1 answers

0
Kaveri On BEST ANSWER

If you list is static and small you way consider creating same using the simple layout, using textview for the questions and buttons for the values.

Or

You can use the recyclerview with GridLayoutManager ans set the column count dynamically as shown here .