Match_parent属性的用途

时间:2011-08-05 05:31:29

标签: android layout

我第一次在互联网代码中遇到了属性“Match_Parent”。 在此之前,我一直在使用Fill_Parent和Wrap_Content。

我想要的是什么: Match_parent属性的目的是什么?

1 个答案:

答案 0 :(得分:2)

请做你的研究。一个简单的搜索将带你到 http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html 它指定FILL_PARENT重命名为MATCH_PARENT,因为它更合适。 MATCH_PARENT和FILL_PARENT可以互换使用,因为它们引用相同的常量。