2012-06-09 54 views

回答

0

看看TimePicker Android教程here

添加OnTimeSetListener,調用set按鈕時會調用OnTimeSetListener

例如(從教程):

// the callback received when the user "sets" the time in the dialog 
private TimePickerDialog.OnTimeSetListener mTimeSetListener = 
    new TimePickerDialog.OnTimeSetListener() { 
     public void onTimeSet(TimePicker view, int hourOfDay, int minute) { 
      mHour = hourOfDay; 
      mMinute = minute; 
      updateDisplay(); 
     } 
    }; 
+0

非常感謝我曾經有過那種實現了它現在的作品謝謝:) – user1446228