Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Horizontal LinearLayout - Wrap Elements [duplicate]

I have a horizontal linear layout that contains textviews generated dynamically, the problem I'm experiencing is that the textviews are squeezed (see image below) if too many of them are added. How would I go about wrapping the linearlayout so that the textviews are printed on the next line?

enter image description here

like image 954
Anton Avatar asked Jan 25 '13 18:01

Anton


1 Answers

LinearLayout cant help with this. Instead you will have make your own Layout as mentioned in this http://nishantvnair.wordpress.com/2010/09/28/flowlayout-in-android/ or incorporate the same approach as of this Android - LinearLayout Horizontal with wrapping children

like image 123
Avinazz Avatar answered Sep 21 '22 14:09

Avinazz