androidandroid-listfragmentfastscroll

How to revert FastScroller android framework commit, and implement in listfragment?


I have a listfragment with a fastscroller, which is not functioning correctly.

According to one of the answers here: Fast scroll thumb disappears while scrolling AlphabetIndexer, there is a commit in the android framework causing issues with FastScroller.java (https://github.com/android/platform_frameworks_base/commit/32c3a6929af9d63de3bf45a61be6e1a4bde136d3)

I'd like to copy the FastScroller.java code to my own project, manually revert the commit and implement the changed 'Fast Scroller' into my own listfragment.

Currently I use the fastscroller by implementing the following:

  ListView lv = getListView();
        lv.setFastScrollEnabled(true);
.
.
.

And I have a sectionIndexer further on.

How do I implement the custom FastScroller.java, when the only reference to the FastScroller is lv.setFastScrollEnabled(true)?


Solution

  • It's not that simple as copying the class from android source. It has a lot of dependences and copying is very hard or even impossible to achieve. Here you have an example implementation: https://github.com/nolanlawson/CustomFastScrollViewDemo