本文整理汇总了Java中com.wx.wheelview.widget.WheelView类的典型用法代码示例。如果您正苦于以下问题:Java WheelView类的具体用法?Java WheelView怎么用?Java WheelView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WheelView类属于com.wx.wheelview.widget包,在下文中一共展示了WheelView类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDrawable
import com.wx.wheelview.widget.WheelView; //导入依赖的package包/类
public static Drawable createDrawable(WheelView.Skin skin, int width, int height, WheelView.WheelViewStyle
style, int wheelSize, int itemH) {
if (skin.equals(WheelView.Skin.Common)) {
return new CommonDrawable(width, height, style, wheelSize, itemH);
} else if (skin.equals(WheelView.Skin.Holo)) {
return new HoloDrawable(width, height, style, wheelSize, itemH);
} else {
return new WheelDrawable(width, height, style);
}
}
示例2: initWheel1
import com.wx.wheelview.widget.WheelView; //导入依赖的package包/类
/**
* 联动WheelView
*/
private void initWheel1() {
mainWheelView = (WheelView) findViewById(R.id.main_wheelview);
mainWheelView.setWheelAdapter(new ArrayWheelAdapter(this));
mainWheelView.setSkin(WheelView.Skin.Holo);
mainWheelView.setWheelData(createMainDatas());
WheelView.WheelViewStyle style = new WheelView.WheelViewStyle();
style.selectedTextSize = 20;
style.textSize = 16;
mainWheelView.setStyle(style);
subWheelView = (WheelView) findViewById(R.id.sub_wheelview);
subWheelView.setWheelAdapter(new ArrayWheelAdapter(this));
subWheelView.setSkin(WheelView.Skin.Holo);
subWheelView.setWheelData(createSubDatas().get(createMainDatas().get(mainWheelView.getSelection())));
subWheelView.setStyle(style);
mainWheelView.join(subWheelView);
mainWheelView.joinDatas(createSubDatas());
childWheelView = (WheelView) findViewById(R.id.child_wheelview);
childWheelView.setWheelAdapter(new ArrayWheelAdapter(this));
childWheelView.setSkin(WheelView.Skin.Holo);
childWheelView.setWheelData(createChildDatas().get(createSubDatas().get(createMainDatas().get(mainWheelView
.getSelection())).get(subWheelView.getSelection())));
childWheelView.setStyle(style);
subWheelView.join(childWheelView);
subWheelView.joinDatas(createChildDatas());
}
示例3: initWheel2
import com.wx.wheelview.widget.WheelView; //导入依赖的package包/类
/**
* holo皮肤
*/
private void initWheel2() {
hourWheelView = (WheelView) findViewById(R.id.hour_wheelview);
hourWheelView.setWheelAdapter(new ArrayWheelAdapter(this));
hourWheelView.setSkin(WheelView.Skin.Holo);
hourWheelView.setWheelData(createHours());
WheelView.WheelViewStyle style = new WheelView.WheelViewStyle();
style.selectedTextColor = Color.parseColor("#0288ce");
style.textColor = Color.GRAY;
style.selectedTextSize = 20;
hourWheelView.setStyle(style);
hourWheelView.setExtraText("时", Color.parseColor("#0288ce"), 40, 70);
minuteWheelView = (WheelView) findViewById(R.id.minute_wheelview);
minuteWheelView.setWheelAdapter(new ArrayWheelAdapter(this));
minuteWheelView.setSkin(WheelView.Skin.Holo);
minuteWheelView.setWheelData(createMinutes());
minuteWheelView.setStyle(style);
minuteWheelView.setExtraText("分", Color.parseColor("#0288ce"), 40, 70);
secondWheelView = (WheelView) findViewById(R.id.second_wheelview);
secondWheelView.setWheelAdapter(new ArrayWheelAdapter(this));
secondWheelView.setSkin(WheelView.Skin.Holo);
secondWheelView.setWheelData(createMinutes());
secondWheelView.setStyle(style);
secondWheelView.setExtraText("秒", Color.parseColor("#0288ce"), 40, 70);
}
示例4: CommonDrawable
import com.wx.wheelview.widget.WheelView; //导入依赖的package包/类
public CommonDrawable(int width, int height, WheelView.WheelViewStyle style, int wheelSize, int itemH) {
super(width, height, style);
mWheelSize = wheelSize;
mItemH = itemH;
init();
}
示例5: HoloDrawable
import com.wx.wheelview.widget.WheelView; //导入依赖的package包/类
public HoloDrawable(int width, int height, WheelView.WheelViewStyle style, int wheelSize, int itemH) {
super(width, height, style);
mWheelSize = wheelSize;
mItemH = itemH;
init();
}
示例6: WheelDrawable
import com.wx.wheelview.widget.WheelView; //导入依赖的package包/类
public WheelDrawable(int width, int height, WheelView.WheelViewStyle style) {
mWidth = width;
mHeight = height;
mStyle = style;
init();
}