Skip to content

Most visited

Recently visited

navigation
added in API level 11

NumberPicker.OnScrollListener

public static interface NumberPicker.OnScrollListener

android.widget.NumberPicker.OnScrollListener


Interface to listen for the picker scroll state.

Summary

Constants

int SCROLL_STATE_FLING

The user had previously been scrolling using touch and performed a fling.

int SCROLL_STATE_IDLE

The view is not scrolling.

int SCROLL_STATE_TOUCH_SCROLL

The user is scrolling using touch, and his finger is still on the screen.

Public methods

abstract void onScrollStateChange(NumberPicker view, int scrollState)

Callback invoked while the number picker scroll state has changed.

Constants

SCROLL_STATE_FLING

added in API level 11
int SCROLL_STATE_FLING

The user had previously been scrolling using touch and performed a fling.

Constant Value: 2 (0x00000002)

SCROLL_STATE_IDLE

added in API level 11
int SCROLL_STATE_IDLE

The view is not scrolling.

Constant Value: 0 (0x00000000)

SCROLL_STATE_TOUCH_SCROLL

added in API level 11
int SCROLL_STATE_TOUCH_SCROLL

The user is scrolling using touch, and his finger is still on the screen.

Constant Value: 1 (0x00000001)

Public methods

onScrollStateChange

added in API level 11
void onScrollStateChange (NumberPicker view, 
                int scrollState)

Callback invoked while the number picker scroll state has changed.

Parameters
view NumberPicker: The view whose scroll state is being reported.

scrollState int: The current scroll state. One of SCROLL_STATE_IDLE, SCROLL_STATE_TOUCH_SCROLL or SCROLL_STATE_IDLE.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)