listView当中有嵌套了有onClickListener的控件时ListView自身的onItemClick无响应的解决方案
2024-08-21 09:26:01
Ref:http://www.cnblogs.com/bluestorm/archive/2013/03/24/2979557.html
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.
Constant | Value | Description |
---|---|---|
beforeDescendants |
0 | The ViewGroup will get focus before any of its descendants. |
afterDescendants |
1 | The ViewGroup will get focus only if none of its descendants want it. |
blocksDescendants |
2 | The ViewGroup will block its descendants from receiving focus. |
解决方案
在ListView要显示的Item的外层加上
android:descendantFocusability="blocksDescendants"
最新文章
- [spring]03_装配Bean
- Python MongoDB使用介绍
- 内置对象session ,cookic,Application,ViewState
- js 闭包之一
- foreach与Iterable学习
- 使chrome支持跨域访问
- org/apache/commons/discovery/tools/DiscoverSingleton
- LeetCode题解——Longest Substring Without Repeating Characters
- Canal 同步异常分析:Could not find first log file name in binary log index file
- CSS的常见问题
- pcre和正则表达式的误点
- Python函数式实现单例特性
- CentOS7 安装VNC
- fashion datasets图像检索实践project
- (已解决)Xcode 运行报错: clang: error: unknown argument: '-websockets'
- jsp连接数据库的乱码问题 servlet请求参数编码处理get post
- testNG 学习笔记 Day 3 常用的断言
- 2588: Count on a tree
- day3 RHCE
- Arcgis Android 常见问题
热门文章
- android多线程断点续传下载文件
- [转]Struts2.3.16.1+Hibernate4.3.4+Spring4.0.2 框架整合
- [webpack] webpack-dev-server介绍及配置
- 教你一招:解决Win10 win7 删除文件或文件夹时提示“找不到该项目”
- Spring-----定时任务Quartz配置
- PHP5.6启动失败
- Python学习笔记——字典
- jquery实现简单瀑布流布局(续):图片懒加载
- @RequestMapping 用法详解之地址映射(转)
- [NHibernate]Parent/Child