1. 程式人生 > >Android系統時間顯示上下午

Android系統時間顯示上下午

  • frameworks/base/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
 public class KeyguardStatusView extends GridLayout {
             clockView12 = DateFormat.getBestDateTimePattern(locale, clockView12Skel);
             // CLDR insists on adding an AM/PM indicator even though it wasn't in the skeleton
             // format.  The following code removes the AM/PM indicator if we didn't want it.
-            if (!clockView12Skel.contains("a")) {
+           /* if (!clockView12Skel.contains("a")) {
                 clockView12 = clockView12.replaceAll("a", "").trim();
-            }
+            }*/
 
             clockView24 = DateFormat.getBestDateTimePattern(locale, clockView24Skel);

  • frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
 public class Clock extends TextView implements DemoMode, Tunable {
                 R.styleable.Clock,
                 0, 0);
         try {
-            mAmPmStyle = a.getInt(R.styleable.Clock_amPmStyle, AM_PM_STYLE_GONE);
+            mAmPmStyle = a.getInt(R.styleable.Clock_amPmStyle, AM_PM_STYLE_NORMAL);
         } finally {
             a.recycle();
         }