Example usage for android.widget AbsListView setFastScrollEnabled

List of usage examples for android.widget AbsListView setFastScrollEnabled

Introduction

In this page you can find the example usage for android.widget AbsListView setFastScrollEnabled.

Prototype

public void setFastScrollEnabled(final boolean enabled) 

Source Link

Document

Specifies whether fast scrolling is enabled or disabled.

Usage

From source file:com.andrew.apollo.ui.fragments.profile.ApolloFragment.java

/**
 * Sets up various helpers for both the list and grid
 *
 * @param list The list or grid/*from   www .ja v  a  2  s .c  o m*/
 */
private void initAbsListView(final AbsListView list) {
    // Release any references to the recycled Views
    list.setRecyclerListener(new RecycleHolder());
    // Listen for ContextMenus to be created
    list.setOnCreateContextMenuListener(this);
    // Show the albums and songs from the selected artist
    list.setOnItemClickListener(this);

    // To help make scrolling smooth
    if (mProfileTabCarousel != null) {
        list.setOnScrollListener(new VerticalScrollListener(null, mProfileTabCarousel, 0));
        // Remove the scrollbars and padding for the fast scroll
        list.setVerticalScrollBarEnabled(false);
        list.setFastScrollEnabled(false);
        list.setPadding(0, 0, 0, 0);
    }
}