ZNDS智能电视网 推荐当贝市场

TV应用下载 / 资源分享区

软件下载 | 游戏 | 讨论 | 电视计算器

综合交流 / 评测 / 活动区

交流区 | 测硬件 | 网站活动 | Z币中心

新手入门 / 进阶 / 社区互助

新手 | 你问我答 | 免费刷机救砖 | ROM固件

查看: 16539|回复: 1
上一主题 下一主题
[教程]

Android2.2中match_parent和fill_parent是一个意思

[复制链接]
跳转到指定楼层
楼主
发表于 2013-8-28 16:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
标题里已经把这个意思表达清楚了,两个参数意思一样,只是某大仙觉得match_parent更贴切,于是从2.2开始你两个词都可以用。那么如果考虑低版本的使用情况你就需要用fill_parent了。
下面是两者相同的证据,看android.view.ViewGroup里的静态嵌套类LayoutParams中的代码:   
  1. public static final int FILL_PARENT = -1;   
          /**   
           * 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 parents padding, if any. Introduced in API Level 8.   
           */   
          public static final int MATCH_PARENT = -1;   
       
          /**   
           * Special value for the height or width requested by a View.   
           * WRAP_CONTENT means that the view wants to be just large enough to fit   
           * its own internal content, taking its own padding into account.   
           */
复制代码
   </font

上一篇:Android程序设计(13)-如何在Eclipse上开发Android应用程序(3)
下一篇:Android2.2中系统自带主题themes.xml的源代码
沙发
发表于 2016-3-10 19:48 | 只看该作者
很给力,ZNDS有你更精彩!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|新帖|标签|软件|Sitemap|ZNDS智能电视网 ( 苏ICP备2023012627号 )

网络信息服务信用承诺书 | 增值电信业务经营许可证:苏B2-20221768 丨 苏公网安备 32011402011373号

GMT+8, 2024-4-27 08:56 , Processed in 0.064823 second(s), 15 queries , Redis On.

Powered by Discuz!

监督举报:report#znds.com (请将#替换为@)

© 2007-2024 ZNDS.Com

快速回复 返回顶部 返回列表