I want to have this layout in my Android app.
Requirements:
- All rectangles should distribute evenly over the entire screen
- The two rectangles on the bottom right should have the same height (so also distributed evenly)
I tried GridLayout
but that won't let me stretch the children across the screen. I tried RelativeLayout
without success. I tried nesting LinearLayouts
with weights, it works, but I read that nesting weights is bad for performance. And finally, I tried TableLayout
with weights, but it does not have something like "row span" like an HTML table so I cannot do the two rectangles in the bottom right corner like I want them to be (without nesting weights again).
Somebody, please help! How hard can it be? I don't know what to do here. I could implement my own ViewGroup
or something to manually implement the layout. But it feels like this is something very simple, so I should be able to use standard layouts.