Code example for DatePickerDialog

Methods: updateDate

		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); 
Experience pair programming with AI  Get Codota for Java