public class WheelOptions<T>
extends java.lang.Object
| Constructor and Description |
|---|
WheelOptions(android.view.View view,
boolean isRestoreItem) |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getCurrentItems()
返回当前选中的结果对应的位置数组 因为支持三级联动效果,分三个级别索引,0,1,2。
在快速滑动未停止时,点击确定按钮,会进行判断,如果匹配数据越界,则设为0,防止index出错导致崩溃。
|
android.view.View |
getView() |
void |
isCenterLabel(boolean isCenterLabel)
Label 是否只显示中间选中项的
|
void |
setCurrentItems(int option1,
int option2,
int option3) |
void |
setCyclic(boolean cyclic)
设置是否循环滚动
|
void |
setCyclic(boolean cyclic1,
boolean cyclic2,
boolean cyclic3)
分别设置第一二三级是否循环滚动
|
void |
setDividerColor(int dividerColor)
设置分割线的颜色
|
void |
setDividerType(WheelView.DividerType dividerType)
设置分割线的类型
|
void |
setLabels(java.lang.String label1,
java.lang.String label2,
java.lang.String label3)
设置选项的单位
|
void |
setLineSpacingMultiplier(float lineSpacingMultiplier)
设置间距倍数,但是只能在1.2-4.0f之间
|
void |
setLinkage(boolean linkage) |
void |
setNPicker(java.util.List<T> options1Items,
java.util.List<T> options2Items,
java.util.List<T> options3Items)
不联动情况下
|
void |
setOptionsSelectChangeListener(OnOptionsSelectChangeListener optionsSelectChangeListener) |
void |
setPicker(java.util.List<T> options1Items,
java.util.List<java.util.List<T>> options2Items,
java.util.List<java.util.List<java.util.List<T>>> options3Items) |
void |
setTextColorCenter(int textColorCenter)
设置分割线之间的文字的颜色
|
void |
setTextColorOut(int textColorOut)
设置分割线以外文字的颜色
|
void |
setTextContentSize(int textSize) |
void |
setTextXOffset(int xOffsetOne,
int xOffsetTwo,
int xOffsetThree)
设置x轴偏移量
|
void |
setTypeface(android.graphics.Typeface font)
设置字体样式
|
void |
setView(android.view.View view) |
public android.view.View getView()
public void setView(android.view.View view)
public void setPicker(java.util.List<T> options1Items, java.util.List<java.util.List<T>> options2Items, java.util.List<java.util.List<java.util.List<T>>> options3Items)
public void setNPicker(java.util.List<T> options1Items, java.util.List<T> options2Items, java.util.List<T> options3Items)
options1Items - options2Items - options3Items - public void setTextContentSize(int textSize)
public void setLabels(java.lang.String label1,
java.lang.String label2,
java.lang.String label3)
label1 - 单位label2 - 单位label3 - 单位public void setTextXOffset(int xOffsetOne,
int xOffsetTwo,
int xOffsetThree)
public void setCyclic(boolean cyclic)
cyclic - 是否循环public void setTypeface(android.graphics.Typeface font)
font - 系统提供的几种样式public void setCyclic(boolean cyclic1,
boolean cyclic2,
boolean cyclic3)
cyclic1,cyclic2,cyclic3 - 是否循环public int[] getCurrentItems()
public void setCurrentItems(int option1,
int option2,
int option3)
public void setLineSpacingMultiplier(float lineSpacingMultiplier)
lineSpacingMultiplier - public void setDividerColor(int dividerColor)
dividerColor - public void setDividerType(WheelView.DividerType dividerType)
dividerType - public void setTextColorCenter(int textColorCenter)
textColorCenter - public void setTextColorOut(int textColorOut)
textColorOut - public void isCenterLabel(boolean isCenterLabel)
isCenterLabel - public void setOptionsSelectChangeListener(OnOptionsSelectChangeListener optionsSelectChangeListener)
public void setLinkage(boolean linkage)