0

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

Community
  • 1
  • 1
Tim Malseed
  • 6,003
  • 6
  • 48
  • 66

2 Answers2

0

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

Michał Z.
  • 4,119
  • 1
  • 22
  • 32
  • I thought that might be the case. Thanks for the link though, despite several Google searches, I never came across this. – Tim Malseed Feb 24 '13 at 23:13
0

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.

theelfismike
  • 1,621
  • 12
  • 18