Code example for DatePickerDialog

Methods: setButton

0
		d = new DateListener();
		initDialogs(); 
	} 
	private void initDialogs(){ 
		dd = new DatePickerDialog(act, d, dateAndTime.get(Calendar.YEAR), 
				dateAndTime.get(Calendar.MONTH), dateAndTime.get(Calendar.DAY_OF_MONTH));	
		dd.setButton(DatePickerDialog.BUTTON_POSITIVE, "Set", dd);
		dd.setButton(DatePickerDialog.BUTTON_NEGATIVE,"Cancel",new DialogInterface.OnClickListener() {
 
			@Override 
			public void onClick(DialogInterface dialog, int which) {
				fireCancelEvent(); 
			} 
		}); 
		td = new TimePickerDialog(act, d, dateAndTime.get(Calendar.HOUR_OF_DAY), 
				dateAndTime.get(Calendar.MINUTE), true);
		td.setButton(DatePickerDialog.BUTTON_POSITIVE, "Set", td);
		td.setButton(DatePickerDialog.BUTTON_NEGATIVE,"Cancel",new DialogInterface.OnClickListener() {
 
			@Override 
Contextual code suggestions in your IDE  Get Codota for Java