Fix bug #7206086 NumberPicker widget should use locale digits
- fix for having the TwoDigitFormatter being able to be recreated if the locale is changed
- accept now also the Arabic and Persian digits
Change-Id: I498a020e6ca4709ba76a2cbfa9a067e570b90e92
diff --git a/src/com/android/contacts/datepicker/DatePicker.java b/src/com/android/contacts/datepicker/DatePicker.java
index 39bbd8d..fe23415 100644
--- a/src/com/android/contacts/datepicker/DatePicker.java
+++ b/src/com/android/contacts/datepicker/DatePicker.java
@@ -110,7 +110,7 @@
mPickerContainer = (LinearLayout) findViewById(R.id.parent);
mDayPicker = (NumberPicker) findViewById(R.id.day);
- mDayPicker.setFormatter(NumberPicker.TWO_DIGIT_FORMATTER);
+ mDayPicker.setFormatter(NumberPicker.getTwoDigitFormatter());
mDayPicker.setOnLongPressUpdateInterval(100);
mDayPicker.setOnValueChangedListener(new OnValueChangeListener() {
@Override
@@ -120,7 +120,7 @@
}
});
mMonthPicker = (NumberPicker) findViewById(R.id.month);
- mMonthPicker.setFormatter(NumberPicker.TWO_DIGIT_FORMATTER);
+ mMonthPicker.setFormatter(NumberPicker.getTwoDigitFormatter());
DateFormatSymbols dfs = new DateFormatSymbols();
String[] months = dfs.getShortMonths();