Code example for DatePickerDialog

Methods: updateDate

0
	{ 
		Log.i(TAG, "[onPrepareDialog]" + day);
		 
	    DatePickerDialog datePickerDialog = (DatePickerDialog) dialog;
		   // set date picker as updated date 
	    datePickerDialog.updateDate(year, month, day);
	} 
 
	private DatePickerDialog.OnDateSetListener datePickerListener = new DatePickerDialog.OnDateSetListener() {
 
		// when dialog box is closed, below method will be called. 
		public void onDateSet(DatePicker view, int selectedYear,int selectedMonth, int selectedDay) { 
		 
			year = selectedYear; 
			month = selectedMonth; 
			day = selectedDay; 
			 
			Log.i(TAG, "[date picker closed]"); 
			 
			updateDateSelection(month, day, year);