diff options
| author | Fabrice Di Meglio <fdimeglio@google.com> | 2012-09-21 12:15:23 -0700 |
|---|---|---|
| committer | Fabrice Di Meglio <fdimeglio@google.com> | 2012-09-21 18:42:47 -0700 |
| commit | d88e3054d08b1f821bb2e27b2647aa16a60d8742 (patch) | |
| tree | 7a55ebb26900c310a8886b7b26e617aec71cbf09 /core/java/android/widget/CalendarView.java | |
| parent | 4e7b551fbffa6112821ed6cfeedd6128463fccd0 (diff) | |
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: Ifbf7e274d971008f4a5782402d4b76d9472b68fc
Diffstat (limited to 'core/java/android/widget/CalendarView.java')
| -rw-r--r-- | core/java/android/widget/CalendarView.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/widget/CalendarView.java b/core/java/android/widget/CalendarView.java index b06da0672a16..b834c8cc781f 100644 --- a/core/java/android/widget/CalendarView.java +++ b/core/java/android/widget/CalendarView.java @@ -1573,7 +1573,8 @@ public class CalendarView extends FrameLayout { // If we're showing the week number calculate it based on Monday int i = 0; if (mShowWeekNumber) { - mDayNumbers[0] = Integer.toString(mTempDate.get(Calendar.WEEK_OF_YEAR)); + mDayNumbers[0] = String.format(Locale.getDefault(), "%d", + mTempDate.get(Calendar.WEEK_OF_YEAR)); i++; } @@ -1594,7 +1595,8 @@ public class CalendarView extends FrameLayout { if (mTempDate.before(mMinDate) || mTempDate.after(mMaxDate)) { mDayNumbers[i] = ""; } else { - mDayNumbers[i] = Integer.toString(mTempDate.get(Calendar.DAY_OF_MONTH)); + mDayNumbers[i] = String.format(Locale.getDefault(), "%d", + mTempDate.get(Calendar.DAY_OF_MONTH)); } mTempDate.add(Calendar.DAY_OF_MONTH, 1); } |
