I have a list item that contains an image (red) and another layout (blue) Normally, the layout would be the first one, but the black layout's width depends on user configurations, so it may not fit the whole content. I thought about making it a Linear Layout and changing the orientation depending on its width, but i read somewhere its possible to do such things with layout only (maybe constraint layouts). Is it possible to achieve this result using only "layout responsiveness", or do i have to input some code also?
Asked
Active
Viewed 33 times
0
-
It depends by the condition to use 1 or 2. How do you test if it fits the whole content? – Gabriele Mariotti Jul 14 '20 at 19:08
-
Red and blue layout have a fixed width, and black depends on column count. If red + blue fits on black, then it should be displayed horizontally, if not, vertically. – Lucas Meneghin Jul 14 '20 at 19:17
-
2Maybe a ConstraintLayout with a Flow helper is a good idea? Check out [this post](https://stackoverflow.com/questions/54874011/constraintlayout-flow-helper-example) – Bö macht Blau Jul 14 '20 at 19:47
-
I think thats exactly what i was looking for. Thanks. – Lucas Meneghin Jul 14 '20 at 19:53