一:锁屏界面时钟字体大小修改
frameworks/base/packages/Keyguard/res/values/dimens.xml
<dimen name="widget_big_font_size">80dp</dimen>
二:锁屏界面时钟竖直方向位置调整
frameworks\base\packages\SystemUI\res\values\dimens.xml
<fraction
name=
"keyguard_clock_y_fraction_max"
>
22.5%
</fraction>
<fraction
name=
"keyguard_clock_y_fraction_min"
>
22.5%
</fraction>
时钟水平方向的修改
packages\Keyguard\res_transsion\layout-v24\keyguard_status_view.xml
<LinearLayout
android:id=
"@+id/keyguard_clock_container"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"start|top"
android:orientation=
"vertical"
android:layout_marginLeft=
"16dp"
>
三:锁屏界面时钟的日期格式修改为首字母大写
frameworks/base/packages/Keyguard/res/layout/keyguard_status_area.xml
style="@style/widget_label"
- android:textAllCaps="true"
android:letterSpacing="0.15"
四:日期的字体大小问题
frameworks/base/packages/Keyguard/res/values/dimens.xml
- <dimen name="widget_label_font_size">14sp</dimen>
+ <dimen name="widget_label_font_size">16sp</dimen>
五:日期的格式修改流程
frameworks/base/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
final
String dateViewSkel = res.getString(hasAlarm
? R.string.abbrev_wday_month_day_no_year_alarm
: R.string.abbrev_wday_month_day_no_year)
;
<string name="abbrev_wday_month_day_no_year">EEEEMMMMd</string>
<string name="abbrev_wday_month_day_no_year">EEEMMMd</string>
四个E、M为全写,三个E、M为简写,详情看下面这个接口说明就行了
dateView = DateFormat.getBestDateTimePattern(locale
,
dateViewSkel)
;
mDateView.setFormat24Hour(Patterns.dateView)
;
mDateView.setFormat12Hour(Patterns.dateView)
;
六:notification模板类
SystemUI\src\com\android\systemui\statusbar\NotificationBackgroundView.java
Y:\tianyajun\android7.0\frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\stack\NotificationStackScrollLayout.java