Android different size dynamic image placement to view

32 Views Asked by At

We have dynamic column size. As you see, we have 2 column here. But it could be 1 or 3. First column image count is also dynamic. If blue image is not appear, green one will be same size with another column. Is there any way to achieve this view with compose, XML or Canvas?

enter image description here

1

There are 1 best solutions below

0
Tommly Jumah On

In XML, you can use linear layouts with weights and then check programmatically if the image is loaded or not (if not load, you may set the visibility of the placeholder to gone). Try and reach out if it's not working.