Code example for TimePickerDialog

Methods: setIconsetMessagesetTitle, setCancelable, show

0
			tvResult.setText(""); 
 
			Calendar now = Calendar.getInstance(); 
 
			TimePickerDialog timePicDlg =  
					new TimePickerDialog(Ch09DateTimeDialog.this, 
					tsListener,	now.get(Calendar.HOUR_OF_DAY), 
					now.get(Calendar.MINUTE), true); 
			timePicDlg.setTitle("輸入時間"); 
			timePicDlg.setMessage("請輸入時間"); 
			timePicDlg.setIcon(android.R.drawable.ic_dialog_info); 
			timePicDlg.setCancelable(false); 
			timePicDlg.show(); 
		} 
	}; 
	 
    private OnTimeSetListener tsListener = 
    		new OnTimeSetListener() {     
		public void onTimeSet (TimePicker  view,  
				int hourOfDay, int minute) { 
			tvResult.setText("您輸入的時間是 :" +