I need to show 3 button in row and 3 button in column means total 9 button on
screen. I assign android:layout_weight 0.33 to each in Horizontal LinearLayout. This is compatible with every screen but I need to also set weight vertically.
In Short I need to create one screen with 9 button and it should compatible with every screen. How can I do this? Can we set weight vertically if yes then how?
Create 3 separate LinearLayouts, one for each row, and encapsulate them in a vertical LinearLayout. Then give the 3 LinearLayouts the same weight.
Pseudo:
Give everything a weight of 3, except for the VerticalLinearLayout. Make sure all of your layout_widths and layout_heights are set to fill_parent.