I’ve been trying to achieve this using nested LinearLayouts. Tried setting both width and height to 0dp . But it’s not achieving 80% width and height. But it’s working when i’m switching it to just single dimension ( ie, just width or height ). Couldn’t get any info on it though i googled a lot .
So, now the question : does the Layout Weight work with both dimensions together?.
Note: I cannot use center gravity it , due to the lack of proper width in the children. They need to get it from linearlayout2 ( fill_parent ) .

1、The LinearLayout weight do not work both with width and height, It depends on the orientation of it. the default is Horizontal.