0

I know you can set fastScroll for listViews, but currently I would like to use a ListActivity with a simplecursoradapter instead. Is there a way to make such a view fast scroll?

THelper
  • 15,333
  • 6
  • 64
  • 104
Suan
  • 34,563
  • 13
  • 47
  • 61

1 Answers1

1

It doesn't matter what kind of cursor you use. Just set android:fastScrollEnabled in your layout XML file, or call setFastScrollEnabled(true) in code if you prefer it that way.

EboMike
  • 76,846
  • 14
  • 164
  • 167
  • Hmm, I tried doing this.setFastScrollEnabled(true) in the ListActivity itself, but that method is not defined for ListActivity. What exactly did you have in mind for doing it in code? – Suan Nov 23 '10 at 05:35
  • 1
    Well, you need to get the ListView through `getListView()`. But you should have an XML layout file too where you can specify android:fastScrollEnabled as well. – EboMike Nov 23 '10 at 05:39
  • I see. Missed the getListView() method. Thanks! – Suan Nov 23 '10 at 05:45