Answer the question
In order to leave comments, you need to log in
How to create a grid with different row/column sizes for images?
It is necessary to implement the display of images (loaded from vk) in cardView using a grid of different image widths/heights.
Example:
(3 img, vk app)
(2 img, vk app)
In fact, I have:
(3 img, my app)
(2 img, my app)
My version is built using a linearLayout, each image has a unit weight. And everything would be fine, but with a certain set of images it doesn’t look very nice (due to scale (Center_Crop)), although in the vk app the images are cropped where they remain normal for me, and vice versa.
But it's not only that. There were doubts about the use of linearLayouts, because the interface starts to slow down with a large number of cardView. I also tried Grid Layout, but I didn’t manage to cram two images into it at all (the second image gets out of the screen a lot). I also looked towards the Greedo library , but to shove one adapter (photo) into another (card)? I'm not sure if the idea is good, and I don't need a scrollable list either.
How would it be correct to implement all this business?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question