本文整理了Java中jsc.kit.datetimepicker.widget.YearMonthPickerDialog.init()
方法的一些代码示例,展示了YearMonthPickerDialog.init()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YearMonthPickerDialog.init()
方法的具体详情如下:
包路径:jsc.kit.datetimepicker.widget.YearMonthPickerDialog
类名称:YearMonthPickerDialog
方法名:init
暂无
代码示例来源:origin: JustinRoom/JSCKit
public void init(@NonNull Date startDate, @NonNull Date endDate){
init(startDate, endDate, new Date(startDate.getTime()));
}
代码示例来源: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();
}
内容来源于网络,如有侵权,请联系作者删除!