android:descendantfocusability
来源:互联网 发布:大庆油田网络客服电话 编辑:程序博客网 时间:2024/05/29 17:07
项目中有个需求 在ListView右侧有一个按钮,要点击产生效果,但是加上按钮后 listView 自身就没法点击了,经过查询发现了一个属性可以解决这个问题
android:descendantfocusability:
Defines the relationship between the ViewGroup and its descendants when looking for a View to take focus.
Must be one of the following constant values.
该属性是当一个为view获取焦点时,定义viewGroup和其子控件两者之间的关系。
属性的值有三种:
beforeDescendants:viewgroup会优先其子类控件而获取到焦点
afterDescendants:viewgroup只有当其子类控件不需要获取焦点时才获取焦点
blocksDescendants:viewgroup会覆盖子类控件而直接获得焦点
当我们在Item的跟布局上 用第三个属性 就可以了。
0 0
- android:descendantFocusability
- android:descendantFocusability
- android:descendantFocusability
- android:descendantfocusability
- android:descendantFocusability
- android:descendantFocusability
- android:descendantFocusability
- android:descendantFocusability
- android:descendantFocusability
- android:descendantFocusability属性
- android:descendantFocusability用法
- android:descendantFocusability用…
- android:descendantFocusability焦点
- android:descendantFocusability用法
- android descendantFocusability用法说明
- android:descendantFocusability解析
- ListView属性Android:descendantFocusability
- android:descendantFocusability 用法
- C#单链表的实现
- 双set表整合出复杂的表(附有sas&n…
- VLAN原理详解
- SAS hash 树与多维临时数组的比较
- 【转载】python基础一(加了我的注…
- android:descendantfocusability
- 【转载】Python 基础语法(二)…
- logistic 回归
- 算法系列--Spiral Matrix
- mapreduce算中位数
- Python教程:[63]操作目录/路径【2…
- R主页上的图的代码
- hive array、map、stru…
- 误操作寄存器位引发的hardfault