mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-18 06:45:03 -05:00
Extend DatePickerDialog and override setTitle() method.
This commit is contained in:
parent
1613a015d6
commit
0a12c41ca9
@ -114,7 +114,7 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
|
||||
date = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
|
||||
}
|
||||
|
||||
DatePickerDialog dialog = new DatePickerDialog(getContext(),
|
||||
DatePickerDialog dialog = new ExpiryDatePickerDialog(getContext(),
|
||||
mExpiryDateSetListener, date.get(Calendar.YEAR), date.get(Calendar.MONTH),
|
||||
date.get(Calendar.DAY_OF_MONTH));
|
||||
mDatePickerResultCount = 0;
|
||||
@ -253,3 +253,14 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ExpiryDatePickerDialog extends DatePickerDialog {
|
||||
|
||||
public ExpiryDatePickerDialog(Context context, OnDateSetListener callBack, int year, int monthOfYear, int dayOfMonth) {
|
||||
super(context, callBack, year, monthOfYear, dayOfMonth);
|
||||
}
|
||||
|
||||
public void setTitle(CharSequence title) {
|
||||
super.setTitle("Set date");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user