public static interface WheelPicker.OnWheelChangeListener
New project structure
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onWheelScrolled(int offset)
当滚轮选择器滚动时回调该方法
滚轮选择器滚动时会将当前滚动位置与滚轮初始位置之间的偏移距离返回,该偏移距离有正负之分,正值表示
滚轮正在往上滚动,负值则表示滚轮正在往下滚动
Invoke when WheelPicker scroll stopped
WheelPicker will return a distance offset which between current scroll position and
initial position, this offset is a positive or a negative, positive means WheelPicker is
scrolling from bottom to top, negative means WheelPicker is scrolling from top to bottom
|
void |
onWheelScrollStateChanged(int state)
当滚轮选择器滚动状态改变时回调该方法
滚动选择器的状态总是会在静止、拖动和滑动三者之间切换,当状态改变时回调该方法
Invoke when WheelPicker's scroll state changed
The state of WheelPicker always between idle, dragging, and scrolling, this method will
be called when they switch
|
void |
onWheelSelected(int position)
当滚轮选择器停止后回调该方法
滚轮选择器停止后会回调该方法并将当前选中的数据项在数据列表中的位置返回
Invoke when WheelPicker scroll stopped
This method will be called when WheelPicker stop and return current selected item data's
position in list
|
void onWheelScrolled(int offset)
Invoke when WheelPicker scroll stopped WheelPicker will return a distance offset which between current scroll position and initial position, this offset is a positive or a negative, positive means WheelPicker is scrolling from bottom to top, negative means WheelPicker is scrolling from top to bottom
offset - 当前滚轮滚动距离上一次滚轮滚动停止后偏移的距离
Distance offset which between current scroll position and initial position
void onWheelSelected(int position)
Invoke when WheelPicker scroll stopped This method will be called when WheelPicker stop and return current selected item data's position in list
position - 当前选中的数据项在数据列表中的位置
Current selected item data's position in list
void onWheelScrollStateChanged(int state)
Invoke when WheelPicker's scroll state changed The state of WheelPicker always between idle, dragging, and scrolling, this method will be called when they switch
state - 滚轮选择器滚动状态,其值仅可能为下列之一
WheelPicker.SCROLL_STATE_IDLE
表示滚动选择器处于静止状态
WheelPicker.SCROLL_STATE_DRAGGING
表示滚动选择器处于拖动状态
WheelPicker.SCROLL_STATE_SCROLLING
表示滚动选择器处于滑动状态
State of WheelPicker, only one of the following
WheelPicker.SCROLL_STATE_IDLE
Express WheelPicker in state of idle
WheelPicker.SCROLL_STATE_DRAGGING
Express WheelPicker in state of dragging
WheelPicker.SCROLL_STATE_SCROLLING
Express WheelPicker in state of scrolling