i am using following example of date picker
http://developer.android.com/guide/tutorials/views/hello-datepicker.html
now i want to perform some functionality
In this part of the code:
private DatePickerDialog.OnDateSetListener mDateSetListener =
new DatePickerDialog.OnDateSetListener() {
public void onDateSet(DatePicker view, int year,
int monthOfYear, int dayOfMonth) {
mYear = year;
mMonth = monthOfYear;
mDay = dayOfMonth;
updateDisplay();
}
};
you have to implement also onClick():
public void onClick (DialogInterface dialog, int which) {
if (which == Button.NEGATIVE) {
//Cancel
}
}
API for Button.NEGATIVE