Wondering if anyone can help me with this issue. My current design is like so.
Scroll View
- Stacked components
- Stacked component 1 - ideally 20% of phone height
- Stacked component 2 - ideally 20% of phone height
- Stacked component 3 - ideally 40% of phone height
- Stacked component 4 - ideally 30% of phone height
.....
I had set the stacked components to
ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2
ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.4 etc....
All was working well while the layout didn't exceed 100% of phone height but now the percentages are relative to the overflowed size and the percentages are more than I require. I tried to insert an absolute layout to fill the phone in the background and size relative to that but I can't set relative to a view outside the relative layout.
Is there any way to set layout heights relative to the phone window in a scrolled view like this?
(I know in reality I could do some maths to convert the percentages to the values I want but this makes maintainability a lot harder )