-
public interface IWheelPicker滚轮选择器方法接口
Interface of WheelPicker
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classIWheelPicker.Companion
-
Method Summary
Modifier and Type Method Description abstract UnitsetOnItemSelectedListener(WheelPicker.OnItemSelectedListener listener)设置滚轮Item选中监听器 abstract UnitsetSameWidth(Boolean hasSameSize)设置数据项是否有相同的宽度Set items of WheelPicker if has same width abstract BooleanhasSameWidth()数据项是否有相同宽度Whether items has same width or not abstract UnitsetOnWheelChangeListener(WheelPicker.OnWheelChangeListener listener)设置滚轮滚动状态改变监听器 abstract IntegergetVisibleItemCount()获取或设置滚轮选择器可见数据项的数量 滚轮选择器的可见数据项数量必须为大于1的整数 这里需要注意的是,滚轮选择器会始终显示奇数个数据项,即便你为其设置偶数个数据项,最终也会被转换为奇数 默认情况下滚轮选择器可见数据项数量为7Get or set the count of current visible items in WheelPicker The count of current visible items in WheelPicker must greater than 1 Notice:count of current visible items in WheelPicker will always is an odd number, even you can set an even number for it, it will be change to an odd number eventually By default, the count of current visible items in WheelPicker is 7 abstract UnitsetVisibleItemCount(Integer visibleItemCount)获取或设置滚轮选择器可见数据项的数量 滚轮选择器的可见数据项数量必须为大于1的整数 这里需要注意的是,滚轮选择器会始终显示奇数个数据项,即便你为其设置偶数个数据项,最终也会被转换为奇数 默认情况下滚轮选择器可见数据项数量为7Get or set the count of current visible items in WheelPicker The count of current visible items in WheelPicker must greater than 1 Notice:count of current visible items in WheelPicker will always is an odd number, even you can set an even number for it, it will be change to an odd number eventually By default, the count of current visible items in WheelPicker is 7 abstract BooleangetIsCyclic()获取或设置滚轮选择器数据项是否为循环状态 开启数据循环会使滚轮选择器上下滚动不再有边界,会呈现数据首尾相接无限循环的效果Get or set whether WheelPicker is cyclic or not WheelPicker's items will be end to end and in an infinite loop if setCyclic true, and there is no border whit scroll when WheelPicker in cyclic state abstract UnitsetIsCyclic(Boolean isCyclic)获取或设置滚轮选择器数据项是否为循环状态 开启数据循环会使滚轮选择器上下滚动不再有边界,会呈现数据首尾相接无限循环的效果Get or set whether WheelPicker is cyclic or not WheelPicker's items will be end to end and in an infinite loop if setCyclic true, and there is no border whit scroll when WheelPicker in cyclic state abstract IntegergetSelectedItemPosition()获取或设置当前被选中的数据项所显示的数据在数据源中的位置Get or set the position of current selected item in data source abstract UnitsetSelectedItemPosition(Integer selectedItemPosition)获取或设置当前被选中的数据项所显示的数据在数据源中的位置Get or set the position of current selected item in data source abstract IntegergetCurrentItemPosition()获取当前被选中的数据项所显示的数据在数据源中的位置 与selectedItemPosition不同的是,该方法所返回的结果会因为滚轮选择器的改变而改变Get the position of current selected item in data source The difference between selectedItemPosition, the value this method return will change by WheelPicker scrolled abstract List<?>getData()获取或设置数据列表Get or set data source of WheelPicker abstract UnitsetData(List<?> data)获取或设置数据列表Get or set data source of WheelPicker abstract StringgetMaximumWidthText()获取或设置最宽的文本Get or set maximum width text abstract UnitsetMaximumWidthText(String maximumWidthText)获取或设置最宽的文本Get or set maximum width text abstract IntegergetMaximumWidthTextPosition()获取或设置最宽的文本在数据源中的位置Get or set the position of maximum width text in data source abstract UnitsetMaximumWidthTextPosition(Integer maximumWidthTextPosition)获取或设置最宽的文本在数据源中的位置Get or set the position of maximum width text in data source abstract IntegergetSelectedItemTextColor()获取或设置当前选中的数据项文本颜色Get or set text color of current selected item abstract UnitsetSelectedItemTextColor(Integer selectedItemTextColor)获取或设置当前选中的数据项文本颜色Get or set text color of current selected item abstract IntegergetItemTextColor()获取或设置数据项文本颜色Get or set text color of items abstract UnitsetItemTextColor(Integer itemTextColor)获取或设置数据项文本颜色Get or set text color of items abstract IntegergetItemTextSize()获取或设置数据项文本尺寸大小Get or set text size of items Unit in px abstract UnitsetItemTextSize(Integer itemTextSize)获取或设置数据项文本尺寸大小Get or set text size of items Unit in px abstract IntegergetItemSpace()获取或设置滚轮选择器数据项之间间距Get or set space between items Unit in px abstract UnitsetItemSpace(Integer itemSpace)获取或设置滚轮选择器数据项之间间距Get or set space between items Unit in px abstract BooleangetIsIndicator()获取或设置滚轮选择器是否显示指示器Get or set whether WheelPicker display indicator or not abstract UnitsetIsIndicator(Boolean isIndicator)获取或设置滚轮选择器是否显示指示器Get or set whether WheelPicker display indicator or not abstract IntegergetIndicatorSize()获取或设置滚轮选择器指示器尺寸Get or set size of indicator Unit in px abstract UnitsetIndicatorSize(Integer indicatorSize)获取或设置滚轮选择器指示器尺寸Get or set size of indicator Unit in px abstract IntegergetIndicatorColor()获取或设置滚轮选择器指示器颜色Get or set color of indicator abstract UnitsetIndicatorColor(Integer indicatorColor)获取或设置滚轮选择器指示器颜色Get or set color of indicator abstract BooleangetIsCurtain()获取或设置滚轮选择器是否显示幕布Get or set whether WheelPicker display curtain or not abstract UnitsetIsCurtain(Boolean isCurtain)获取或设置滚轮选择器是否显示幕布Get or set whether WheelPicker display curtain or not abstract IntegergetCurtainColor()获取或设置滚轮选择器幕布颜色Get or set color of curtain abstract UnitsetCurtainColor(Integer curtainColor)获取或设置滚轮选择器幕布颜色Get or set color of curtain abstract BooleangetIsAtmospheric()获取或设置滚轮选择器是否有空气感Get or set whether WheelPicker has atmospheric or not abstract UnitsetIsAtmospheric(Boolean isAtmospheric)获取或设置滚轮选择器是否有空气感Get or set whether WheelPicker has atmospheric or not abstract BooleangetIsCurved()获取或设置滚轮选择器是否开启卷曲效果Get or set whether WheelPicker enable curved effect or not abstract UnitsetIsCurved(Boolean isCurved)获取或设置滚轮选择器是否开启卷曲效果Get or set whether WheelPicker enable curved effect or not abstract IntegergetItemAlign()获取或设置滚轮选择器数据项的对齐方式Get or set alignment of WheelPicker abstract UnitsetItemAlign(Integer itemAlign)获取或设置滚轮选择器数据项的对齐方式Get or set alignment of WheelPicker abstract TypefacegetTypeface()获取或设置数据项文本字体对象Get or set typeface of item text abstract UnitsetTypeface(Typeface typeface)获取或设置数据项文本字体对象Get or set typeface of item text -
-
Method Detail
-
setOnItemSelectedListener
abstract Unit setOnItemSelectedListener(WheelPicker.OnItemSelectedListener listener)
设置滚轮Item选中监听器
- Parameters:
listener- 滚轮Item选中监听器WheelPicker.OnItemSelectedListener
-
setSameWidth
abstract Unit setSameWidth(Boolean hasSameSize)
设置数据项是否有相同的宽度
Set items of WheelPicker if has same width
-
hasSameWidth
abstract Boolean hasSameWidth()
数据项是否有相同宽度
Whether items has same width or not
-
setOnWheelChangeListener
abstract Unit setOnWheelChangeListener(WheelPicker.OnWheelChangeListener listener)
设置滚轮滚动状态改变监听器
- Parameters:
listener- 滚轮滚动状态改变监听器
-
getVisibleItemCount
abstract Integer getVisibleItemCount()
获取或设置滚轮选择器可见数据项的数量 滚轮选择器的可见数据项数量必须为大于1的整数 这里需要注意的是,滚轮选择器会始终显示奇数个数据项,即便你为其设置偶数个数据项,最终也会被转换为奇数 默认情况下滚轮选择器可见数据项数量为7
Get or set the count of current visible items in WheelPicker The count of current visible items in WheelPicker must greater than 1 Notice:count of current visible items in WheelPicker will always is an odd number, even you can set an even number for it, it will be change to an odd number eventually By default, the count of current visible items in WheelPicker is 7
-
setVisibleItemCount
abstract Unit setVisibleItemCount(Integer visibleItemCount)
获取或设置滚轮选择器可见数据项的数量 滚轮选择器的可见数据项数量必须为大于1的整数 这里需要注意的是,滚轮选择器会始终显示奇数个数据项,即便你为其设置偶数个数据项,最终也会被转换为奇数 默认情况下滚轮选择器可见数据项数量为7
Get or set the count of current visible items in WheelPicker The count of current visible items in WheelPicker must greater than 1 Notice:count of current visible items in WheelPicker will always is an odd number, even you can set an even number for it, it will be change to an odd number eventually By default, the count of current visible items in WheelPicker is 7
-
getIsCyclic
abstract Boolean getIsCyclic()
获取或设置滚轮选择器数据项是否为循环状态 开启数据循环会使滚轮选择器上下滚动不再有边界,会呈现数据首尾相接无限循环的效果
Get or set whether WheelPicker is cyclic or not WheelPicker's items will be end to end and in an infinite loop if setCyclic true, and there is no border whit scroll when WheelPicker in cyclic state
-
setIsCyclic
abstract Unit setIsCyclic(Boolean isCyclic)
获取或设置滚轮选择器数据项是否为循环状态 开启数据循环会使滚轮选择器上下滚动不再有边界,会呈现数据首尾相接无限循环的效果
Get or set whether WheelPicker is cyclic or not WheelPicker's items will be end to end and in an infinite loop if setCyclic true, and there is no border whit scroll when WheelPicker in cyclic state
-
getSelectedItemPosition
abstract Integer getSelectedItemPosition()
获取或设置当前被选中的数据项所显示的数据在数据源中的位置
Get or set the position of current selected item in data source
-
setSelectedItemPosition
abstract Unit setSelectedItemPosition(Integer selectedItemPosition)
获取或设置当前被选中的数据项所显示的数据在数据源中的位置
Get or set the position of current selected item in data source
-
getCurrentItemPosition
abstract Integer getCurrentItemPosition()
获取当前被选中的数据项所显示的数据在数据源中的位置 与selectedItemPosition不同的是,该方法所返回的结果会因为滚轮选择器的改变而改变
Get the position of current selected item in data source The difference between selectedItemPosition, the value this method return will change by WheelPicker scrolled
-
getMaximumWidthText
abstract String getMaximumWidthText()
获取或设置最宽的文本
Get or set maximum width text
-
setMaximumWidthText
abstract Unit setMaximumWidthText(String maximumWidthText)
获取或设置最宽的文本
Get or set maximum width text
-
getMaximumWidthTextPosition
abstract Integer getMaximumWidthTextPosition()
获取或设置最宽的文本在数据源中的位置
Get or set the position of maximum width text in data source
-
setMaximumWidthTextPosition
abstract Unit setMaximumWidthTextPosition(Integer maximumWidthTextPosition)
获取或设置最宽的文本在数据源中的位置
Get or set the position of maximum width text in data source
-
getSelectedItemTextColor
abstract Integer getSelectedItemTextColor()
获取或设置当前选中的数据项文本颜色
Get or set text color of current selected item
-
setSelectedItemTextColor
abstract Unit setSelectedItemTextColor(Integer selectedItemTextColor)
获取或设置当前选中的数据项文本颜色
Get or set text color of current selected item
-
getItemTextColor
abstract Integer getItemTextColor()
获取或设置数据项文本颜色
Get or set text color of items
-
setItemTextColor
abstract Unit setItemTextColor(Integer itemTextColor)
获取或设置数据项文本颜色
Get or set text color of items
-
getItemTextSize
abstract Integer getItemTextSize()
获取或设置数据项文本尺寸大小
Get or set text size of items Unit in px
-
setItemTextSize
abstract Unit setItemTextSize(Integer itemTextSize)
获取或设置数据项文本尺寸大小
Get or set text size of items Unit in px
-
getItemSpace
abstract Integer getItemSpace()
获取或设置滚轮选择器数据项之间间距
Get or set space between items Unit in px
-
setItemSpace
abstract Unit setItemSpace(Integer itemSpace)
获取或设置滚轮选择器数据项之间间距
Get or set space between items Unit in px
-
getIsIndicator
abstract Boolean getIsIndicator()
获取或设置滚轮选择器是否显示指示器
Get or set whether WheelPicker display indicator or not
-
setIsIndicator
abstract Unit setIsIndicator(Boolean isIndicator)
获取或设置滚轮选择器是否显示指示器
Get or set whether WheelPicker display indicator or not
-
getIndicatorSize
abstract Integer getIndicatorSize()
获取或设置滚轮选择器指示器尺寸
Get or set size of indicator Unit in px
-
setIndicatorSize
abstract Unit setIndicatorSize(Integer indicatorSize)
获取或设置滚轮选择器指示器尺寸
Get or set size of indicator Unit in px
-
getIndicatorColor
abstract Integer getIndicatorColor()
获取或设置滚轮选择器指示器颜色
Get or set color of indicator
-
setIndicatorColor
abstract Unit setIndicatorColor(Integer indicatorColor)
获取或设置滚轮选择器指示器颜色
Get or set color of indicator
-
getIsCurtain
abstract Boolean getIsCurtain()
获取或设置滚轮选择器是否显示幕布
Get or set whether WheelPicker display curtain or not
-
setIsCurtain
abstract Unit setIsCurtain(Boolean isCurtain)
获取或设置滚轮选择器是否显示幕布
Get or set whether WheelPicker display curtain or not
-
getCurtainColor
abstract Integer getCurtainColor()
获取或设置滚轮选择器幕布颜色
Get or set color of curtain
-
setCurtainColor
abstract Unit setCurtainColor(Integer curtainColor)
获取或设置滚轮选择器幕布颜色
Get or set color of curtain
-
getIsAtmospheric
abstract Boolean getIsAtmospheric()
获取或设置滚轮选择器是否有空气感
Get or set whether WheelPicker has atmospheric or not
-
setIsAtmospheric
abstract Unit setIsAtmospheric(Boolean isAtmospheric)
获取或设置滚轮选择器是否有空气感
Get or set whether WheelPicker has atmospheric or not
-
getIsCurved
abstract Boolean getIsCurved()
获取或设置滚轮选择器是否开启卷曲效果
Get or set whether WheelPicker enable curved effect or not
-
setIsCurved
abstract Unit setIsCurved(Boolean isCurved)
获取或设置滚轮选择器是否开启卷曲效果
Get or set whether WheelPicker enable curved effect or not
-
getItemAlign
abstract Integer getItemAlign()
获取或设置滚轮选择器数据项的对齐方式
Get or set alignment of WheelPicker
-
setItemAlign
abstract Unit setItemAlign(Integer itemAlign)
获取或设置滚轮选择器数据项的对齐方式
Get or set alignment of WheelPicker
-
getTypeface
abstract Typeface getTypeface()
获取或设置数据项文本字体对象
Get or set typeface of item text
-
setTypeface
abstract Unit setTypeface(Typeface typeface)
获取或设置数据项文本字体对象
Get or set typeface of item text
-
-
-
-