-
public interface WheelPicker.OnWheelChangeListener滚轮选择器滚动时监听接口
-
-
Method Summary
Modifier and Type Method Description abstract UnitonWheelScrolled(Integer 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 abstract UnitonWheelSelected(Integer position)当滚轮选择器停止后回调该方法 滚轮选择器停止后会回调该方法并将当前选中的数据项在数据列表中的位置返回Invoke when WheelPicker scroll stopped This method will be called when WheelPicker stop and return current selected item data's position in list abstract UnitonWheelScrollStateChanged(Integer 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 -
-
Method Detail
-
onWheelScrolled
abstract Unit onWheelScrolled(Integer 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
- Parameters:
offset- 当前滚轮滚动距离上一次滚轮滚动停止后偏移的距离Distance offset which between current scroll position and initial position
-
onWheelSelected
abstract Unit onWheelSelected(Integer position)
当滚轮选择器停止后回调该方法 滚轮选择器停止后会回调该方法并将当前选中的数据项在数据列表中的位置返回
Invoke when WheelPicker scroll stopped This method will be called when WheelPicker stop and return current selected item data's position in list
- Parameters:
position- 当前选中的数据项在数据列表中的位置Current selected item data's position in list
-
onWheelScrollStateChanged
abstract Unit onWheelScrollStateChanged(Integer 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
- Parameters:
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
-
-
-
-