Prototik / HoloEverywhere

NO LONGER MAINTAINED. DEVELOP FOR 4.X+ DUDE.
MIT License
2.18k stars 608 forks source link

ClassCastException on ListFragment.setFastScrollEnabled() #261

Closed ChrisDavis8 closed 11 years ago

ChrisDavis8 commented 11 years ago

when you set FastSCrollEnabled(true) FastScroller.getSectionsFromIndexer() does some casting to BaseAdapter which it cant do with the ListAdapterWrapper

01-04 18:33:33.335: E/AndroidRuntime(14126): Caused by: java.lang.ClassCastException: org.holoeverywhere.widget.ListView$ListAdapterWrapper cannot be cast to android.widget.BaseAdapter 01-04 18:33:33.335: E/AndroidRuntime(14126): at android.widget.FastScroller.getSectionsFromIndexer(FastScroller.java:511) 01-04 18:33:33.335: E/AndroidRuntime(14126): at android.widget.FastScroller.init(FastScroller.java:271) 01-04 18:33:33.335: E/AndroidRuntime(14126): at android.widget.FastScroller.(FastScroller.java:155) 01-04 18:33:33.335: E/AndroidRuntime(14126): at android.widget.AbsListView.setFastScrollEnabled(AbsListView.java:1208)

tverona commented 11 years ago

Hitting this issue as well. Holoeverywhere's ListView implements setAdapter (which wraps it) but does not implement corresponding getAdapter (which should unwrap it...)

Prototik commented 11 years ago

Adapter view use getadapter for some needs. If getadapter will be unwrap adapter - then fact of wrap of adapter meanless.

About issue: fastscroll fixed.

tverona commented 11 years ago

Regarding getAdapter - got it, thanks!

SutharBhargav commented 11 years ago

how to solve it ... which property need to set..