SectionIndexer中的getSectionForPosition()与getPositionForSection()
生活随笔
收集整理的這篇文章主要介紹了
SectionIndexer中的getSectionForPosition()与getPositionForSection()
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
大家在做字母索引的時候常常會用到SectionIndexer這個類,里面有2個重要的方法
1. ? getSectionForPosition()通過該項的位置,獲得所在分類組的索引號
2.?getPositionForSection() ? ? ? 根據分類列的索引號獲得該序列的首個位置
?
getSectionForPosition(0) 返回 0
getSectionForPosition(1) 返回 0
getSectionForPosition(2) 返回 0
getSectionForPosition(3) 返回 1
轉載于:https://www.cnblogs.com/krislight1105/p/5002331.html
總結
以上是生活随笔為你收集整理的SectionIndexer中的getSectionForPosition()与getPositionForSection()的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Android 进阶 Fragment
- 下一篇: 【noiOJ】P1996