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();
         }


猜你喜欢

转载自blog.csdn.net/jydzm/article/details/85779485