FILL_PARENT和MATCH_PARENT [英] FILL_PARENT and MATCH_PARENT

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

问题描述

现在我用MATCH_PARENT都在我的应用程序。 我已经决定提供给Android 2.1的用户应用程序,但MATCH_PARENT就不介绍了,直到Android 2.2的

Right now I am using MATCH_PARENT all throughout my app. I've decided to make the app available to Android 2.1 users but the MATCH_PARENT is not introduced till Android 2.2

我应该如何去这样做,如果我想我的应用程序使用MATCH_PARENT当Android版本2.2及以上,但使用FILL_PARENT如果是2.1(或更低,如果我决定把它开到他们以后)?

How should I go about doing this if I want my app to use MATCH_PARENT when the Android version is 2.2 and above but use FILL_PARENT if it's 2.1 (or lower if I decide to open it to them later on)?

推荐答案

FILL_PARENT MATCH_PARENT 都是一样的东西,如果用户具有版本2.2或更高 FILL_PARENT 将由 MATCH_PARENT 自动替换。因此,最好使用 FILL_PARENT ,以支持向后兼容性。
有关于Android开发网站这个博客,我希望你能找到它,如果你想有更多这方面的细节。

FILL_PARENT and MATCH_PARENT are same thing, if the version the user is having is 2.2 or higher FILL_PARENT would be replaced by MATCH_PARENT automatically. So it's better to use FILL_PARENT, to support backward compatibility.
There was a blog on Android dev site about this, I hope you can find it, if you want to have more details on this.

这篇关于FILL_PARENT和MATCH_PARENT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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