如何从字符串中设置 DatePicker 中的日期(例如:02/10/19):
以下是代码:
iqp_editDate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new DatePickerDialog(ActivityClass.this, (DatePickerDialog.OnDateSetListener) date1, y, m, d).show();
}
});
DatePickerDialog.OnDateSetListener date1 = new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
y = year;
m = month;
d = dayOfMonth;
dateMonth = month + 1;
dateYear = year;
}
};
慕哥9229398
Cats萌萌
一只斗牛犬
相关分类