posted 21 years ago
In this code,a layout manager of 3 rows and 1 column is created and 5 buttons are added to it.
When I run this application,I find 3 buttons in the first row,and 2 buttons in the second with the space for a third button left.Now I understand why this happens,its because GridLayoutManager is row major and it has to strictly adhere to the number of rows specified,unless it is 0.But couldn't it have placed four buttons in the top row and 1 in the 2nd row.How will we determine how many buttons are placed in the top row and how many in the bottom row?