1

我正在尝试实现自定义,它在除Android LollipopFastScrollListener之外的每个平台上都可以正常工作,它在以下行崩溃:

final Field fastScrollerField = AbsListView.class.getDeclaredField("mFastScroller");

说:

12-14 16:46:29.034: E/AndroidRuntime(29702): Caused by: java.lang.NoSuchFieldException: mFastScroller
12-14 16:46:29.034: E/AndroidRuntime(29702): at java.lang.Class.getDeclaredField(Class.java:886)

谁能指导我有关 Android Lollipop 的修复。

4

1 回答 1

1

Found the solution be comparing AbsListView of Lollipop with previous versions and found out the the keyword/name for getting declared feild is changed to mFastScroll from mFastScroller...

于 2014-12-14T12:44:57.330 回答