-1

I need to set views into some layout. View will be one by one by one like in LinearLayout with orientational="horizontal" and if there is no place then last view will go to the next line. How it possible?


Small screen    Bigger screen
| [][][] |      | [][][][] |
| [][][] |  ->  | [][][][] |
| [][][] |      | []       |
AskQuestion
  • 346
  • 4
  • 18

2 Answers2

0

Use WeightSum attribute in the layout & layout_Weight in the views

Check this link for reference

Community
  • 1
  • 1
Don Chakkappan
  • 7,397
  • 5
  • 44
  • 59
0

GridView is the way to go. It'll give you two-dimensional scrollable grid and you can make it choose the number of columns automatically by stating that numColumns parameter equals to auto_fit.

aga
  • 27,954
  • 13
  • 86
  • 121