旧行李 2011-04-22 19:31 采纳率: 25%
浏览 379
已采纳

配对父母和填充父母之间有什么区别?

I'm a little confused about two XML properties: match_parent and fill_parent. It seems that both are the same. Is there any difference between them?

转载于:https://stackoverflow.com/questions/5761960/what-is-the-difference-between-match-parent-and-fill-parent

  • 写回答

17条回答 默认 最新

  • 笑故挽风 2011-04-22 19:33
    关注

    They're the same thing (in API Level 8+). Use match_parent.

    FILL_PARENT (renamed MATCH_PARENT in API Level 8 and higher), which means that the view wants to be as big as its parent (minus padding)

    ...

    fill_parent: The view should be as big as its parent (minus padding). This constant is deprecated starting from API Level 8 and is replaced by match_parent.

    http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(16条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部