summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorEric Fischer <>2009-03-24 18:30:27 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-24 18:30:27 -0700
commitc36bde662fd679d4cd74d786655ae39d097daf1c (patch)
tree7fdb452081928ac427f632ab19a6ef282eae3a9c /core
parent2547afed02e92525a40bd3362240ac338daf87d9 (diff)
downloadframeworks_base-c36bde662fd679d4cd74d786655ae39d097daf1c.zip
frameworks_base-c36bde662fd679d4cd74d786655ae39d097daf1c.tar.gz
frameworks_base-c36bde662fd679d4cd74d786655ae39d097daf1c.tar.bz2
Automated import from //branches/donutburger/...@140780,140780
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/DatePickerDialog.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/java/android/app/DatePickerDialog.java b/core/java/android/app/DatePickerDialog.java
index ee5e0d5..863cbcc 100644
--- a/core/java/android/app/DatePickerDialog.java
+++ b/core/java/android/app/DatePickerDialog.java
@@ -47,6 +47,7 @@ public class DatePickerDialog extends AlertDialog implements OnClickListener,
private final OnDateSetListener mCallBack;
private final Calendar mCalendar;
private final java.text.DateFormat mDateFormat;
+ private final java.text.DateFormat mTitleDateFormat;
private final String[] mWeekDays;
private int mInitialYear;
@@ -108,6 +109,8 @@ public class DatePickerDialog extends AlertDialog implements OnClickListener,
mWeekDays = symbols.getShortWeekdays();
mDateFormat = DateFormat.getMediumDateFormat(context);
+ mTitleDateFormat = java.text.DateFormat.
+ getDateInstance(java.text.DateFormat.FULL);
mCalendar = Calendar.getInstance();
updateTitle(mInitialYear, mInitialMonth, mInitialDay);
@@ -126,7 +129,7 @@ public class DatePickerDialog extends AlertDialog implements OnClickListener,
@Override
public void show() {
super.show();
-
+
/* Sometimes the full month is displayed causing the title
* to be very long, in those cases ensure it doesn't wrap to
* 2 lines (as that looks jumpy) and ensure we ellipsize the end.
@@ -160,8 +163,7 @@ public class DatePickerDialog extends AlertDialog implements OnClickListener,
mCalendar.set(Calendar.YEAR, year);
mCalendar.set(Calendar.MONTH, month);
mCalendar.set(Calendar.DAY_OF_MONTH, day);
- String weekday = mWeekDays[mCalendar.get(Calendar.DAY_OF_WEEK)];
- setTitle(weekday + ", " + mDateFormat.format(mCalendar.getTime()));
+ setTitle(mTitleDateFormat.format(mCalendar.getTime()));
}
@Override