I need to build a layout with the set of linear layouts. The layout has to occupy a defined percentage of the screen. I need to do this to have a similar look in all the dev
Start your layout_width or layout_height as 0dp instead of wrap_content. (If it's in a vertical layout, layout_height should be 0dp; if it's in a horizontal layout, layout_width should be 0dp)
The layout_weight describes how to divide the remaining space after the layout_widths/layout_heights have been assigned.
Note that wrap_content doesn't mean "make the text wrap"; it means set that dimension to the "preferred" dimension of the view.