简体   繁体   English

滚动时具有固定groupView的ExpandableListView

[英]ExpandableListView with fixed groupView while scrolling

I'm using an ExpandableListView in my app and I everything is working fine. 我在我的应用程序中使用ExpandableListView,我一切正常。 Although, every groupView contains a large number of children and when the groupView is expanded and the children displayed, I would like the groupView to stay on top while scrolling down the list. 虽然,每个groupView包含大量子节点,并且当扩展groupView并显示子节点时,我希望groupView在向下滚动列表时保持在顶部。 In other words I'm looking out for a way to avoid that the groupViews and the children views are treated as a unique list when one groupView is expanded. 换句话说,我正在寻找一种方法来避免在展开一个groupView时将groupViews和子视图视为唯一列表。 Is there any way to achieve that? 有没有办法实现这一目标?

If you are set on using the ExpandableListView you might be able to have some logic that adds your view to a view above the list view altogether. 如果您使用ExpandableListView进行设置,则可能会有一些逻辑将视图添加到列表视图上方的视图中。

HEADER VIEW then ListView HEADER VIEW然后是ListView

when a user clicks the group set the header view, which sits above the list view, to the group. 当用户单击该组时,将位于列表视图上方的标题视图设置为该组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM