Code example for DatePickerDialog

Methods: setIconsetMessagesetTitle, setCancelable, show

0
			tvResult.setText(""); 
 
			Calendar now = Calendar.getInstance(); 
 
			DatePickerDialog datePicDlg =  
					new DatePickerDialog(Ch09DateTimeDialog.this, 
					dsListener,	now.get(Calendar.YEAR), 
					now.get(Calendar.MONTH),  
					now.get(Calendar.DAY_OF_MONTH)); 
			datePicDlg.setTitle("輸入日期"); 
			datePicDlg.setMessage("請輸入日期"); 
			datePicDlg.setIcon(android.R.drawable.ic_dialog_info); 
			datePicDlg.setCancelable(false); 
			datePicDlg.show(); 
		} 
	}; 
	 
    private OnDateSetListener dsListener = new OnDateSetListener() {    
		public void onDateSet (DatePicker view, int year,  
				               int monthOfYear, int dayOfMonth) { 
			tvResult.setText("您輸入的日期是 :" +