match_parent和FILL_PARENT之间的区别是什么? [英] What is the difference between match_parent and fill_parent?

查看:167
本文介绍了match_parent和FILL_PARENT之间的区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对两个XML特性有点糊涂: match_parent FILL_PARENT 。似乎都是相同的。他们之间有什么区别呢?

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?

推荐答案

他们是同样的事情(在API级别8 +)。使用 match_parent

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

FILL_PARENT(改名MATCH_PARENT在API级别8或更高),这意味着视图想要成为大如其父(减去填充)

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 :视图应象大作为它的父(减去填充)。此常数德precated从API级别8日起,代之以 match_parent

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.

<一个href="http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html">http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html

这篇关于match_parent和FILL_PARENT之间的区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆