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

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

reply all (1)
伊谢尔伦

This is basically solved. Since PinnedHeaderListView inherits from ListView, there is a setSelection method in ListView.
Solution:
Traverse the data sourceList, generate aArrayList positionListcorresponding to the structure of PinnedHeaderListView (for distinction, it can be regarded as sectionpositionList.add(1), when it is an ordinary list elementpositionList.add(0)), and then add the position where the data is "1" Go to anotherArrayList sectionPositionsand callonClick()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
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!