listView当中有嵌套了有onClickListener的控件时ListView自身的onItemClick无响应的解决方案
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"
listView当中有嵌套了有onClickListener的控件时ListView自身的onItemClick无响应的解决方案的更多相关文章
- android 在一个scrollView里面嵌套一个需要滑动的控件(listView、gridView)
package cn.via.dageeeOrderFood.widget; import android.content.Context; import android.graphics.Point ...
- 与众不同 windows phone (52) - 8.1 新增控件: AutoSuggestBox, ListView, GridView, SemanticZoom
[源码下载] 与众不同 windows phone (52) - 8.1 新增控件: AutoSuggestBox, ListView, GridView, SemanticZoom 作者:webab ...
- 重新想象 Windows 8 Store Apps (11) - 控件之 ListView 和 GridView
原文:重新想象 Windows 8 Store Apps (11) - 控件之 ListView 和 GridView [源码下载] 重新想象 Windows 8 Store Apps (11) - ...
- winform利用ImageList控件和ListView控件组合制作图片文件浏览器
winform利用ImageList控件和ListView控件组合制作图片文件浏览器,见图,比较简单,实现LISTVIEW显示文件夹图片功能. 1.选择文件夹功能代码: folderBrowserDi ...
- 母版页改变被嵌套的页面中的控件ID的解决方法
使用过模板页的朋友都会很纳闷,怎么页面的用js通过getElementById(“id”):找不到对象.查看了页面源代码才发现,原来控件的ID变了,这是母版页导致的.因为母版页怕母版页本身页面中的控件 ...
- 我的Android进阶之旅------>Android中ListView中嵌套(ListView)控件时item的点击事件不起作的问题解决方法
开发中常常需要自己定义Listview,去继承BaseAdapter,在adapter中按照需求进行编写,问题就出现了,可能会发生点击每一个item的时候没有反应,无法获取的焦点. 如果你的自定义Li ...
- 我的Android进阶之旅------>Android中ListView中嵌套(ListView)控件时item的点击事件不起作的问题解决方法
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvb3V5YW5nX3Blbmc=/font/5a6L5L2T/fontsize/400/fill/I0JBQk ...
- Android控件开发——ListView
上篇博客解决了Android客户端通过WebService与服务器端程序进行交互的问题,这篇博客重点关注两个问题,一个是Android应用程序如何与本机文件型数据库SQLite进行交互,另一问题则是如 ...
- Android控件之ListView的使用
ListView是Android当中一个非常常用的数据显示控件. 第一种可以使用List<HashMap<String , Object>>,作为适配器的数据源来显示要显示的数 ...
随机推荐
- 【jQuery api】isArray
<!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-l ...
- python day1:初识Python(一)
一.Python 简介: Python免费.开源,面向对象的解释型语言,其语法简洁,在使用中无需考虑如何管理内存等底层问题,并且支持在linux,windows等多平台运行,Python的标准库很强大 ...
- MySQL多配置方式的多实例的部署
安装MySQL需要注意的事项: 选择MySQL的版本的建议: 1)稳定版:选择开源的社区版的稳定版GA版本 2)选择MySQL数据库GA版本发布后六个月以后得GA版本 3)选择发布版本前后几个月没有大 ...
- Asp.Net MVC<七>:Model
Model 指ViewModel ,其作用: 用于目标Action的参数绑定 用于View呈现 Model元数据则是对ViewModel数据类型的描述,其作用在于控制作为Model的数据对象在View ...
- redis-windows免安装版本安装多个redies
1.复制两份redis:端口分别为6369和6379 2.修改端口 6379为redis默认的端,不改; 进入6369的下面找到如下配置文件: redis.conf 修改端口 然后分别启动redis- ...
- get last dirname/filename in a file path argument
$ dirname /home/train/00.incipient_data/data_for_gene_prediction_and_RNA-seq/240_rep2.fastq /home/tr ...
- MySQL的insert语句的区别
SQL Server: insert into tb_articleType (articleType_name,articleType_info) values ("test", ...
- eclipse项目部署路径
1.项目名点击右键 2.选择Build Path ------>Configure Build Path... 3.选择Source ----->Default output fol ...
- RabbitMQ简介
AMQP简介 在了解RabbitMQ之前,首先要了解AMQP协议.AMQP,即Advanced Message Queuing Protocol,高级消息队列协议,是应用层协议的一个开放标准,为面向消 ...
- MySQL 常用函数和语句笔记
CONCAT()函数 CONCAT()函数代表着字符串的链接,例子有 SELECT COUNT(1) FROM ums_commodity WHERE 1 = 1 and deleted=0 and ...