gpt4 book ai didi

android - match_parent 和 fill_parent 有什么区别?

转载 作者:IT老高 更新时间:2023-10-28 12:48:06 26 4
gpt4 key购买 nike

我对两个 XML 属性有点困惑:match_parentfill_parent。似乎两者都是一样的。它们之间有什么区别吗?

最佳答案

它们是相同的东西(在 API 级别 8+ 中)。使用 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

关于android - match_parent 和 fill_parent 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5761960/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com