Added in API level 11
OnScrollListener
interface OnScrollListener
android.widget.NumberPicker.OnScrollListener |
Interface to listen for the picker scroll state.
Summary
Constants | |
---|---|
static Int |
The user had previously been scrolling using touch and performed a fling. |
static Int |
The view is not scrolling. |
static Int |
The user is scrolling using touch, and their finger is still on the screen. |
Public methods | |
---|---|
abstract Unit |
onScrollStateChange(view: NumberPicker!, scrollState: Int) Callback invoked while the number picker scroll state has changed. |
Constants
SCROLL_STATE_FLING
Added in API level 11
static val SCROLL_STATE_FLING: Int
The user had previously been scrolling using touch and performed a fling.
Value: 2
SCROLL_STATE_IDLE
Added in API level 11
static val SCROLL_STATE_IDLE: Int
The view is not scrolling.
Value: 0
SCROLL_STATE_TOUCH_SCROLL
Added in API level 11
static val SCROLL_STATE_TOUCH_SCROLL: Int
The user is scrolling using touch, and their finger is still on the screen.
Value: 1
Public methods
onScrollStateChange
Added in API level 11
abstract fun onScrollStateChange(
view: NumberPicker!,
scrollState: Int
): Unit
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 . Value is android.widget.NumberPicker.OnScrollListener#SCROLL_STATE_IDLE , android.widget.NumberPicker.OnScrollListener#SCROLL_STATE_TOUCH_SCROLL , or android.widget.NumberPicker.OnScrollListener#SCROLL_STATE_FLING |