Android - GridLayout cell sizes

I am trying to use GridLayout with ImageViews. My problem is that I have all the images in different sizes. I set the row counter and the number of columns, but somehow I need to set the size of the fixed cell (somehow uniform - like in the cell width = total / num columns, and height height = total / num rows). I want to do this so that when setting the height and width of the image in match_parent, the image does not expand beyond the cell size, and the layout looks uniform.

I need 5 rows and 3 columns. Can anyone suggest how to do this?

+4
source share
1 answer

. , , . . , , .

+5

Source: https://habr.com/ru/post/1542522/


All Articles