// 设置日期
@Override
public void onClick(View v) {new DatePickerDialog(activity,new DatePickerDialog.OnDateSetListener() {@Overridepublic void onDateSet(DatePicker view, int year,int monthOfYear, int dayOfMonth) {// 设置calendar.set(year, monthOfYear, dayOfMonth);}}, // 设置年,月,日calendar.get(Calendar.YEAR),calendar.get(Calendar.MONTH),calendar.get(Calendar.DAY_OF_MONTH)).show();
}
// 设置时间
public void onClick(View v) {new TimePickerDialog(activity,new TimePickerDialog.OnTimeSetListener() {@Overridepublic void onTimeSet(TimePicker view,int hourOfDay, int minute) {