如何保持ExpandableListView开的呢? [英] How to keep the ExpandableListView Opened?
本文介绍了如何保持ExpandableListView开的呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的工作我已经完成的工作,现在只有一个,我想要做的事情是我不希望的ListView是下拉上点击扩展列表视图的,而我想告诉它打开了ExpandableListView所有的项目里面没有显示对他们进行任何点击。
I am working on the ExpandableListView I have completed the work, now only one thing that I want to do is I don't want the ListView to be DropDown on click of the Expandable List View rather I want to show it opened with all the Items displayed inside without performing any click on them.
谁能告诉我,我怎么能做到这一点特别。
Can anyone tell me how can i do that particularly.
推荐答案
做到这一点,每一个群体来展开:
Do this for every one of the groups to expand them:
listView1.expandGroup(int groupPosition);
如果你想prevent组崩溃,那么做到这一点:
If you want to prevent group collapse, then do this:
listView1.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener()
{
public boolean onGroupClick(ExpandableListView arg0, View itemView, int itemPosition, long itemId)
{
listView1.expandGroup(itemPosition);
return true;
}
});
这篇关于如何保持ExpandableListView开的呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文