当我在列表中使用Checkox onListItemClick方法不叫 [英] onListItemClick method not called when I use Checkox in list

查看:168
本文介绍了当我在列表中使用Checkox onListItemClick方法不叫的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我是新到Android ...我想显示的复选框并单击这些复选框多,我想他们在一个单一的字符串数据的动态列表...但我的问题是,我无法调用onListItemClick方法,如果我使用复选框,在我的名单...

Hi guys I am new to android...I want to display a dynamic list of CheckBox and on Clicking multiple of those CheckBoxes i want their data in a single string...But my problem is that i am unable to call onListItemClick method if I use checkBox in my List...

这是我的理解和经验,但是这将作为焦点的视图列表项prevents onListItemClick在ListActivity射击()单击列表中的项目时。
但是,任何人都可以PLZ给我的解决方案...

It is my understanding and experience however that putting a focusable view in the list item prevents the firing of onListItemClick() in the ListActivity when the list item is clicked. But can anyone Plz give me solution...

我刚才提到的链接像

<一个href=\"http://stackoverflow.com/questions/1821871/android-how-to-fire-onlistitemclick-in-listactivity-with-buttons-in-list\">Android:如何在列表按钮火onListItemClick在Listactivity?

<一个href=\"http://stackoverflow.com/questions/5023074/android-listactivity-onlistitemclick-calls-adapter-getview\">Android ListActivity onListItemClick来电转接getView

但无法找到一个解决方案...

but unable to find a solution...

推荐答案

要使它工作,你可以设置复选框和其他领域中的列表项无法点击和unfocusable,按属性:

To make it working you can set Checkboxes and other fields in the ListItem unclickable and unfocusable, by properties:

android:clickable="false"
android:focusable="false"

这篇关于当我在列表中使用Checkox onListItemClick方法不叫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆