0
private TimePickerDialog.OnTimeSetListener timeListener = new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
if(hourOfDay < 10){
strHourOfDay = "0" + hourOfDay;
} else { strHourOfDay = String.valueOf(hourOfDay);}
if(minute < 10){
strMinute = "0" + minute;
} else { strMinute = String.valueOf(minute);}
period.put("hour",strHourOfDay);
period.put("minute",strMinute);
periodTime.setText(strHourOfDay + ":" + strMinute);
}
};
我使用TimePickerDialog保存小時和分鐘。在strHourOfDay中成功輸入了小時天數的小數點輸入日期。不過分鐘未能在strMinute輸入..timepickerdialog分鐘輸入錯誤
調試結果是在畫面
有什麼錯?
發表您的logcat – Lingeshwaran