I want to define a layout that it's orientation is horizontal, but if width of the child views exceeds the width, it adds the new child view in a new line.
can it be done?
For this you will need a FlowLayout whose custom implementation is given on this link
Courtesy : Nishant Nair
http://nishantvnair.wordpress.com/2010/09/28/flowlayout-in-android/
You can use RelativeLayout as the parent view, and put many LinearLayouts in it, giving each of them a separate id, and adjusting their position relative to each other (in your case "below").
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With