是choiceMode与ExpandableListView兼容? [英] Is choiceMode compatible with ExpandableListView?

查看:125
本文介绍了是choiceMode与ExpandableListView兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能做出多重选择列表安卓choiceMode =multipleChoice setChoiceMode(ListView.CHOICE_MODE_MULTIPLE)上的 ExpandableListView ?我能够做到这一点与复选框 ES上一个普通的的ListView ,但它似乎并没有与工作 ExpandableListView 。在后者中,单击列表项(父母一方或子女),因为它在前者不影响复选框。

Is it possible to make a multiple choice list with android:choiceMode="multipleChoice" or setChoiceMode(ListView.CHOICE_MODE_MULTIPLE) on an ExpandableListView? I am able to do this with CheckBoxes on a plain ListView, but it doesn't seem to be working with ExpandableListView. In the latter, clicking the list item (either parent or child) does not affect the checkbox as it does in the former.

我已经注意到,有可能准确地点击该复选框,使之切换,但是这是一个非常小的目标。

I have noticed that it is possible to click exactly on the checkbox to make it toggle, but this is a very small target.

下面是一个相关解答论坛帖子

推荐答案

一些研究之后,答案是没有。经过的地位似乎是由位置内部跟踪,让家长(又名群)项的​​方式向下已签可能其检查,如果在列表中的previous父膨胀传送到儿童它上面的列表

After some study, the answer is No. "Checked" status seems to be tracked internally by "position", so that a "parent" (aka "group") item a ways down the list that is checked may transfer its check to a child above it if the previous parent in the list is expanded.

我结束了我自己的数据结构跟踪复选标记。

I ended up tracking checkmarks in my own data structure.

这篇关于是choiceMode与ExpandableListView兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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