After creating the RelativeLayout set the parameters for the layout_width and layout_height values match_parent , but the system says that for layout_height you need to use wrap_content , and not match_parent .

What can this be connected with and will it not be critical to use match_parent in both RelativeLayout parameters?

  • At child, go, layout_alignParentBottom installed? - Suvitruf
  • one
    Show me some markup ... - YuriySPb
  • <ScrollView android: layout_width = "match_parent" android: layout_height = "match_parent"> <RelativeLayout android: layout_width = "match_parent" android: layout_height = "match_parent"> <LinearLayout android: layout_width = "match_parent" android: layout_height = "match_parent" android: layout_width = "match_parent" android: layout_height = "match_parent" > - Vyacheslav

1 answer 1

The system curses because you have a ScrollView in the markup and using match_parent makes it meaningless - the content will simply grow to fit the screen and will not scroll.

  • In fact, it scrolls with both values ​​of 'layout_weight'. It looks like the note system is advisory in nature. The recommended value is more logical. - iramm
  • Have you checked on all platforms and versions of Android? Not the fact that it will work everywhere ... - Shutko Alexander
  • I'll have to agree with you. Of course, not at all. - iramm