Andoid L版本把时间格式设置为12小时制,状态栏时间不显示AM/PM的,这是google的默认设计。下拉状态栏,左上角的时间是带有AM,PM的,如果想要显示AM/PM怎么办呢?
[SOLUTION]
把mAmPmStyle的初始值改为AM_PM_STYLE_NORMAL
Clock.java alps\frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\policy
public Clock(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
TypedArray a = context.getTheme().obtainStyledAttributes(
attrs,
R.styleable.Clock,
0, 0);
try {
///修改此处
//mAmPmStyle = a.getInt(R.styleable.Clock_amPmStyle, AM_PM_STYLE_GONE);
mAmPmStyle = AM_PM_STYLE_NORMAL
} finally {
a.recycle();
}
}