Android的 - 用的CursorAdapter AlphabetIndexer [英] Android - CursorAdapter with AlphabetIndexer
问题描述
我使用的是CursorAdapater为我的ListView,我也想使用部分的AlphabetIndexer
I'm using a CursorAdapater for my ListView, and I also want to use an AlphabetIndexer with sections
问题是,当我滚动部份ListView中,有一种是因为部分溢出:如果我有光标20行和4段,光标试图去定位21,22等至极创建一个IllegalStateException
The issue is when I scroll ths ListView, there is a kind of overflow because of sections : if I have 20 rows in the cursor and 4 sections, the cursor try to go to position 21, 22 etc, wich create an IllegalStateException.
有没有人有一个想法,以纠正呢?
Does anyone have an idea to correct this ?
我真的需要一个CursorAdapater定制我的观点,并有我的数据的访问DIRECTE
(事情,不要似乎可用SimpleCursorAdapator或ArrayAdapter)
I really need a CursorAdapater to custom my view and have a directe access to my data (things that dont seem to be available with SimpleCursorAdapator or ArrayAdapter)
感谢
推荐答案
看看这个链接。希望它帮助。
Check out this link. Hope it helps.
<一个href=\"http://www.rogcg.com/blog/2013/02/10/Implementing-a-ListView-with-AlphabetIndexer-and-CursorAdapter-on-Android\" rel=\"nofollow\">http://www.rogcg.com/blog/2013/02/10/Implementing-a-ListView-with-AlphabetIndexer-and-CursorAdapter-on-Android
这篇关于Android的 - 用的CursorAdapter AlphabetIndexer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!