在ExpandableListView忽略SetSelectedChild()方法 [英] the ExpandableListView ignore SetSelectedChild() method

查看:1073
本文介绍了在ExpandableListView忽略SetSelectedChild()方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用code

ExpandableListView expandListView = (ExpandableListView) findViewById(R.id.list);
expandListView.setAdapter(adapter);
Boolean flag = expandListView.setSelectedChild(1, 1, true);

但它没有工作。什么都没发生。该集团并没有扩大。

but it didn't work. Nothing happened. The group didn't expand.

推荐答案

我发现我的答案在这里:
<一href=\"http://stackoverflow.com/questions/6775838/expandablelistview-ignores-setselectedchild\">ExpandableListView忽略setSelectedChild()

I found my answer here: ExpandableListView ignores setSelectedChild()

调用ExpandableListView.expandGroup(INT);做了工作。

calling ExpandableListView.expandGroup(int); did the job

这篇关于在ExpandableListView忽略SetSelectedChild()方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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