本文整理了Java中jsc.kit.datetimepicker.widget.YearMonthPickerDialog
类的一些代码示例,展示了YearMonthPickerDialog
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YearMonthPickerDialog
类的具体详情如下:
包路径:jsc.kit.datetimepicker.widget.YearMonthPickerDialog
类名称:YearMonthPickerDialog
[英]Email:1006368252@qq.com
QQ:1006368252
https://github.com/JustinRoom/JSCKit
[中]电子邮件:1006368252@qq.com
QQ:1006368252
https://github.com/JustinRoom/JSCKit
代码示例来源:origin: JustinRoom/JSCKit
public void init(@NonNull Date startDate, @NonNull Date endDate){
init(startDate, endDate, new Date(startDate.getTime()));
}
代码示例来源:origin: JustinRoom/JSCKit
@Override
public void onClick(View v) {
dismiss();
if (selectedResultHandler != null)
selectedResultHandler.handleSelectedResult(selectedDate);
}
});
代码示例来源:origin: JustinRoom/JSCKit
@Override
public void run() {
executeAnimator(wheelView2);
}
}, 100);
代码示例来源:origin: JustinRoom/JSCKit
private void showDialog() {
if (dialog == null) {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR, 2010);
calendar.set(Calendar.MONTH, 4);
Date startDate = calendar.getTime();
calendar.set(Calendar.YEAR, 2032);
calendar.set(Calendar.MONTH, 10);
Date endDate = calendar.getTime();
Builder builder = new Builder();
builder.setTitle("选择年月");
builder.setLeftText("取消");
builder.setRightText("确定");
builder.setTextColor(0xFFCCCCCC);
builder.setMinTextAlpha(0xFf);
dialog = new YearMonthPickerDialog(this);
dialog.setSelectedResultHandler(new TwoPickerDialog.OnSelectedResultHandler() {
@Override
public void handleSelectedResult(int index1, String item1, int index2, String item2) {
}
@Override
public void handleSelectedResult(@NonNull Date date) {
showToast(new SimpleDateFormat("yyyy-MM", Locale.getDefault()).format(date));
}
});
dialog.updateUI(builder);
dialog.init(startDate, endDate);
}
dialog.show();
}
代码示例来源:origin: JustinRoom/JSCKit
calendar.set(Calendar.YEAR, selectedYear);
int lastSelectedMonthIndex = getSelected2();
int lastSelectedMonth = months.get(lastSelectedMonthIndex);
setItems2(monthArray);
int monthSelectedIndex = findSelectedIndexByValue(1, lastSelectedMonth);
setSelected2(monthSelectedIndex);
calendar.set(Calendar.MONTH, months.get(monthSelectedIndex) - 1);
executeAnimator(wheelView2);
代码示例来源:origin: JustinRoom/JSCKit
setItems1(yearArray);
setItems2(monthArray);
setSelected1(findSelectedIndexByValue(0, selectedYear));
setSelected2(findSelectedIndexByValue(1, selectedMonth));
代码示例来源:origin: JustinRoom/JSCKit
@Override
public void show() {
executeAnimator(wheelView1);
wheelView1.postDelayed(new Runnable() {
@Override
public void run() {
executeAnimator(wheelView2);
}
}, 100);
super.show();
}
内容来源于网络,如有侵权,请联系作者删除!