android:duplicateParentState

When this attribute is set to true, the view gets its drawable state (focused, pressed, etc.) from its direct parent rather than from itself.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

This corresponds to the global attribute resource symbol duplicateParentState.


View的一个比较实用的属性

如果设置此属性,将直接从父容器中获取绘图状态(光标,按下等)。 注意仅仅是获取绘图状态,而没有获取事件,也就是你点一下LinearLayout时Button有被点击的效果,但是不执行点击事件“



更多相关文章

  1. 【阿里云镜像】切换阿里巴巴开源镜像站镜像——Debian镜像
  2. Android获取SD卡路径/内存的几种方法
  3. Android中可以做的两件坏事---破解锁屏密码和获取Wifi密码
  4. 尝试用Android获取IMEI,折腾的一天,结果只有一句话,是不是用混合编
  5. Android(安卓)获取View的位置参数:x,y和相对父容器的偏移量以及中
  6. android:windowSoftInputMode属性使用
  7. Android(安卓)系统图标
  8. 获取Android自带资源的方式
  9. Android下如何获取Mac地址?

随机推荐

  1. android Layout XML属性
  2. 解析 ViewTreeObserver 源码,体会观察者模
  3. Android中读取电话本Contacts联系人的所
  4. Android(安卓)内功心法(1.3)——android
  5. Android单张图片查看、单指移动、双指缩
  6. 我的Android进阶之旅------>Android拍照
  7. Android(安卓)Looper类摘记
  8. 如何成为一个Android高手
  9. 【Android】Uri、UriMatcher、ContentUri
  10. Android之NDK开发