搜索
 找回密码
 立即注册

简单一步 , 微信登陆

xml文件中一些属性介绍

作者:sean | 时间:2016-9-28 11:55:00 | 阅读:3270| 只看该作者
android:persistent="false"
//Android系统中,有一种永久性应用。它们对应的AndroidManifest.xml文件里,会将persistent属性设为true,
//在系统启动之时,AMS的systemReady()会加载所有persistent为true的应用。

android:allowClearUserData="false"
用户是否能选择自行清除数据,默认为true,程序管理器包含一个选择允许用户清除数据。

android:allowBackup="false"
为应用程序数据的备份和恢复功能,

android:hardwareAccelerated="true"
是否开启硬件加速

android:supportsRtl="true"
声明你的application是否愿意支持从右到左(原来RTL就是right-to-left 的缩写...)的布局。

android:clipChildren="false"
android:clipChildren的意思:是否限制子View在其范围内 做动画的时候有用  
只需在根节点设置android:clipChildren为false即可,默认为true

ScrollView.setViewFillPort(true)
当ScrollView里的元素想填满ScrollView时,使用"fill_parent"是不管用的,必须为ScrollView设置:android:fillViewport="true"。
当ScrollView没有fillVeewport=“true”时, 里面的元素(比如LinearLayout)会按照wrap_content来计算(不论它是否设了"fill_parent"),而如果LinearLayout的元素设置了fill_parent,那么也是不管用的,因为LinearLayout依赖里面的元素,而里面的元素又依赖LinearLayout,这样自相矛盾.所以里面元素设
置了fill_parent,也会当做wrap_content来计算.

收藏
收藏0
分享
分享
点赞
点赞0
反对
反对0
该会员没有填写今日想 ...
回复

使用道具 举报

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