public abstract class WheelPicker
extends <any>
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
cycleDisable |
protected WheelView.DividerConfig |
dividerConfig |
protected int |
labelTextColor |
protected float |
lineSpaceMultiplier |
protected int |
offset |
protected int |
textColorFocus |
protected int |
textColorNormal |
protected int |
textPadding |
protected int |
textSize |
protected boolean |
textSizeAutoFit |
protected android.graphics.Typeface |
typeface |
protected boolean |
useWeight |
| 构造器和说明 |
|---|
WheelPicker(android.app.Activity activity) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected android.widget.TextView |
createLabelView() |
protected WheelView |
createWheelView() |
android.view.View |
getContentView()
得到选择器视图,可内嵌到其他视图容器
|
void |
setCycleDisable(boolean cycleDisable)
设置是否禁用循环
|
void |
setDividerColor(int lineColor)
设置分隔线颜色
|
void |
setDividerConfig(WheelView.DividerConfig config)
设置分隔线配置项,设置null将隐藏分割线及阴影
|
void |
setDividerRatio(float ratio)
设置分隔线长度比例
|
void |
setDividerVisible(boolean visible)
设置分隔线是否可见
|
void |
setLabelTextColor(int labelTextColor) |
void |
setLineColor(int color)
已过时。
use
setDividerColor(int) instead |
void |
setLineConfig(WheelView.DividerConfig config)
已过时。
use
setDividerConfig(WheelView.DividerConfig) instead |
void |
setLineSpaceMultiplier(float multiplier)
可用于设置每项的高度,范围为2-4
|
void |
setLineVisible(boolean visible)
已过时。
use
setDividerVisible(boolean) instead |
void |
setOffset(int offset)
设置选项偏移量,可用来要设置显示的条目数,范围为1-5。
|
void |
setPadding(int textPadding)
已过时。
|
void |
setShadowColor(int color)
设置分隔阴影颜色及透明度
|
void |
setShadowColor(int color,
int alpha)
设置分隔阴影颜色及透明度
|
void |
setShadowVisible(boolean shadowVisible)
设置分隔阴影是否可见
|
void |
setTextColor(int textColor)
设置文字颜色
|
void |
setTextColor(int textColorFocus,
int textColorNormal)
设置文字颜色
|
void |
setTextPadding(int textPadding)
可用于设置每项的宽度,单位为dp
|
void |
setTextSize(int textSize)
设置文字大小
|
void |
setTextSizeAutoFit(boolean textSizeAutoFit)
条目内容过长时是否自动减少字号来适配
|
void |
setUseWeight(boolean useWeight)
是否使用比重来平分布局
|
protected float lineSpaceMultiplier
protected int textPadding
protected int textSize
protected android.graphics.Typeface typeface
protected int textColorNormal
protected int textColorFocus
protected int labelTextColor
protected int offset
protected boolean cycleDisable
protected boolean useWeight
protected boolean textSizeAutoFit
protected WheelView.DividerConfig dividerConfig
public final void setLineSpaceMultiplier(float multiplier)
@Deprecated public void setPadding(int textPadding)
setTextPadding(int) insteadpublic void setTextPadding(int textPadding)
public void setTextSize(int textSize)
public void setTextColor(int textColorFocus,
int textColorNormal)
public void setTextColor(int textColor)
public void setLabelTextColor(int labelTextColor)
public void setShadowVisible(boolean shadowVisible)
public void setShadowColor(int color)
public void setShadowColor(int color,
int alpha)
public void setDividerVisible(boolean visible)
@Deprecated public void setLineVisible(boolean visible)
setDividerVisible(boolean) instead@Deprecated public void setLineColor(int color)
setDividerColor(int) insteadpublic void setDividerColor(int lineColor)
public void setDividerRatio(float ratio)
public void setDividerConfig(@Nullable
WheelView.DividerConfig config)
@Deprecated public void setLineConfig(WheelView.DividerConfig config)
setDividerConfig(WheelView.DividerConfig) insteadpublic void setOffset(int offset)
public void setCycleDisable(boolean cycleDisable)
public void setUseWeight(boolean useWeight)
public void setTextSizeAutoFit(boolean textSizeAutoFit)
public android.view.View getContentView()
protected WheelView createWheelView()
protected android.widget.TextView createLabelView()