如何保持 ExpandableListView 打开?
我正在研究 ExpandableListView 我已经完成了工作,现在我只想做的一件事是我不希望 ListView 在单击可扩展列表视图时变为 DropDown,而是希望显示它与所有项目一起打开无需对其进行任何单击即可显示在内部。
谁能告诉我具体该怎么做。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对每个组执行此操作以展开它们:
如果您想防止组崩溃,请执行以下操作:
Do this for every one of the groups to expand them:
If you want to prevent group collapse, then do this:
解决方案:- 始终将可扩展列表保持在扩展模式
实际上非常简单,您不需要执行任何操作,只需将这一行放入适配器的 getGroupView 中,并且您的可扩展列表视图始终处于打开/扩展状态:--
这肯定有效...享受...!
Solution:- To Keep The Expandable list in Expanded mode all the times
It is actually very simple you dont need to do anything but just put this one line in your getGroupView of your adapter and your expandablelistview always be in opened/expanded state:--
This works for sure... Enjoy..!
打开
ExpandableListView
组:折叠
ExpandableListView
组:Open
ExpandableListView
Group:Collapse
ExpandableListView
Group: