Question

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)?

Was it helpful?

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

OTHER TIPS

Have you tried using a regular Fragment, but having a list contained within it?

It could be that the ListFragment implementation isn't doing exactly what you want, but the standard Fragment implementation, with you putting a ListView in the layout might work differently.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top