Enabling fast scrolling

Locating a specific item in a large list is fairly difficult, so we should provide a means to help the user get there quickly.

How to do it...

In order to help the user navigate through large lists, Android provides a few means to skip large sections of data. One of these aids is Fast Scroll, or simply, using a scroll thumb.

  • In order to enable the thumb, we set the FastScrollEnabled property:
    listView.FastScrollEnabled = true;
  • Alternatively, if we are using the layout resources, we can set the FastScrollEnabled property as follows:
    android:fastScrollEnabled="true"
  • If we are targeting Android versions 3.0 and later, and want the thumb to always be visible, we can use the FastScrollAlwaysVisible property:
    listView.FastScrollAlwaysVisible ...

Get Xamarin Mobile Development for Android Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.