Android PinnedHeaderListView如何切换(定位)到某一个Header?
迷茫
迷茫 2017-04-17 13:42:02
0
1
693
迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
伊谢尔伦

This is basically solved. Since PinnedHeaderListView inherits from ListView, there is a setSelection method in ListView.
Solution:
Traverse the data source List<Dish>, generate a ArrayList<Integer> positionList corresponding to the structure of PinnedHeaderListView (for distinction, it can be regarded as section positionList.add(1), when it is an ordinary list element positionList.add(0)), and then add the position where the data is "1" Go to another ArrayList<Integer> sectionPositions and call onClick() in the (你的ListView名称).setSelection(sectionPositions.get(i)) event of the menu list.
The sliding animation effect has not been implemented, and I don’t know much about it yet.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template