I'm setting up an android app that will display data like this:
Line Name X GGGGRR
Another Name Y GGGRRR
...
Last Name Z GGRRRR
where the names and x, y, z numbers are TextView
s and the Gs and Rs are ImageView
s showing red and green circles.
What's the best way to lay this out? I think putting the list in a vertical LinearLayout
makes sense.
I don't want to repeat a bunch of LinearLayout
s containing TextView
s and ImageView
s in the XML
, because I might need to adjust the number of entries dynamically. What's the best way to encapsulate these lines? Should I create a custom layout for it? Or would it be better to use a fragment for each line?