android:layout_width="match_parent"

android:layout_height="match_parent"


"match_parent" 这个设置值 Since: API Level 8

public static final int MATCH_PARENT

Since: API Level 8

Special value for the height or width requested by a View. MATCH_PARENT means that the view wants to be as big as its parent, minus the parent's padding, if any. Introduced in API Level 8.

Constant Value: -1 (0xffffffff)

因此当你使用sdk2.2以下来编译时,编译会通不过!


再来看看下面这个

public static final int FILL_PARENT

Since: API Level 1

Special value for the height or width requested by a View. FILL_PARENT means that the view wants to be as big as its parent, minus the parent's padding, if any.This value is deprecated starting in API Level 8 and replaced byMATCH_PARENT.

Constant Value: -1 (0xffffffff)

也就是说,当你使用2.2以上的sdk编译成的app运行在2.2以下系统的手机上, "match_parent"的使用就赞同于使用了“full_parent”,因此这个值的设置对app的多os版本运行是没有影响的!!!



更多相关文章

  1. android使用CheckedTextView搭配listview完成选择列表
  2. android点滴5
  3. AndroidManifest文件中android属性
  4. Java后端学Android(2)-Intent的使用
  5. Retrofit系列文章翻译1—开始创建android客户端
  6. Android中RelativeLayout布局各个xml相对布局属性的介绍和使用
  7. 在Android程序中使用全局变量
  8. 在Android中如何使用全局变量--Application context
  9. Android(安卓)AIDL使用

随机推荐

  1. Android(安卓)Support Library-FloatingA
  2. Android下使用正则表达式
  3. android 运行时生成dex文件,并装载调用
  4. Android(安卓)Studio gradle 使用最新版
  5. Android实际开发中遇到的问题和部分解决
  6. 遇到Android(安卓)SDK Build-tools V19
  7. Android之webView入门
  8. android sensor framework
  9. 全志A40i Android7永不休眠及不锁屏的修
  10. android中使用frameAnimation帧动画方法