The Layout_height property of the Android Relativelayout layout is set to Wrap_content when the pit:
Conditions for this pit to appear:
The Layout_height property of the 1.RelativeLayout layout is set to Wrap_content
2. A "Center View" is set to Layout_centerx (Layout_centervertical, Layout_centerhorizontal, layout_centerinparent)
3. Other view layout relative to "Center view"
At this time the pit appeared:
No matter what other view settings are under "Center View" (Layout_below, Layout_below), above (layout_above), bottom alignment (layout_alignbottom) and so on, all is not valid!
Pits Solution:
The Layout_height property of the Relativelayout layout is set to Match_parent!
Even if the outer layer has linearlayout use layout_weight to divide the space, its match_parent will not support the outer linearlayout space.
Originally want to set wrap_content, in fact, is afraid of the internal relativelayout set match_parent will be big only, practice proves, worry about!
Personal experience-the Layout_height property of the Android Relativelayout layout is set to wrap_content when the pit