From 4b5da86d04200ba278b62ff99da91e212b87e9af Mon Sep 17 00:00:00 2001 From: Deepanshu Gupta Date: Sat, 12 Oct 2013 18:37:19 -0700 Subject: [PATCH] Fix DatePicker and Calendar widget in layoutlib. [DO NOT MERGE] Issue: https://code.google.com/p/android/issues/detail?id=59732 Change-Id: I281b3fdad88c591281a3645592c84f3e2cb61d09 (cherry picked from commit 6335590aa8997944cc7fb358a315dbb9b789f87f) --- tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java b/tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java index fb2fc8545338b..a7f8e4d5ff446 100644 --- a/tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java +++ b/tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java @@ -171,10 +171,13 @@ public class ICU_Delegate { result.longStandAloneMonthNames = result.longMonthNames; result.shortStandAloneMonthNames = result.shortMonthNames; + // The platform code expects this to begin at index 1, rather than 0. It maps it directly to + // the constants from java.util.Calendar. result.longWeekdayNames = new String[] { - "Monday" ,"Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }; + "", "Sunday", "Monday" ,"Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; result.shortWeekdayNames = new String[] { - "Mon" ,"Tue", "Wed", "Thu", "Fri", "Sat", "Sun" }; + "", "Sun", "Mon" ,"Tue", "Wed", "Thu", "Fri", "Sat" }; + result.longStandAloneWeekdayNames = result.longWeekdayNames; result.shortStandAloneWeekdayNames = result.shortWeekdayNames;