android弹出时间选择框

来源:互联网 发布:麦当劳改名金拱门知乎 编辑:程序博客网 时间:2024/05/17 01:09

时间选择框:

new DatePickerDialog(this, new OnDateSetListener() {@Overridepublic void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {if (year >= 1910 && year <= 2014) {int temp = monthOfYear + 1;String monthStr = temp < 10 ? "0" + temp : "" + temp;etBirthday.setText(year + "-" + monthStr + "-" + dayOfMonth);} else {AppMsg.makeText(PersonalEditActivity.this, "超出可设置范围");}}}, 1990, 0, 1).show();


 

 


 

2 0
原创粉丝点击