需求:
把状态栏图标修改增大一些
修改前:
修改后:
解决办法:
1.修改系统状态栏的高度 ok
- +++ b/frameworks/base/core/res/res/values/dimens.xml
- @@ -34,7 +34,7 @@
- <!-- Height of the status bar -->
- <dimen name="status_bar_height">@dimen/status_bar_height_portrait</dimen>
- <!-- Height of the status bar in portrait -->
- - <dimen name="status_bar_height_portrait">24dp</dimen>
- + <dimen name="status_bar_height_portrait">48dp</dimen>
- <!-- Height of the status bar in landscape -->
- <dimen name="status_bar_height_landscape">@dimen/status_bar_height_portrait</dimen>
- <!-- Height of area above QQS where battery/time go -->
2.修改锁屏显示"飞行模式" 文本大小
- +++ b/vendor/mediatek/proprietary/packages/apps/SystemUI/res/layout/keyguard_status_bar.xml
- @@ -70,6 +70,7 @@
- android:layout_toStartOf="@id/system_icons_container"
- android:gravity="center_vertical"
- android:ellipsize="marquee"
- + android:textSize="28sp"
- android:textDirection="locale"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?attr/wallpaperTextColorSecondary"
3.修改图标 和 字体
- +++ b/vendor/mediatek/proprietary/packages/apps/SystemUI/res/values/dimens.xml
- @@ -40,7 +40,7 @@
- <dimen name="status_bar_battery_icon_width">8.5dp</dimen>
- //修改状态栏时钟字体的大小
- <!-- The font size for the clock in the status bar. -->
- - <dimen name="status_bar_clock_size">14sp</dimen>
- + <dimen name="status_bar_clock_size">28sp</dimen>
- <!-- The starting padding for the clock in the status bar. -->
- <dimen name="status_bar_clock_starting_padding">7dp</dimen>
- @@ -61,7 +61,7 @@
- <dimen name="status_bar_airplane_spacer_width">4dp</dimen>
- //修改状态栏图标的大小
- <!-- The amount to scale each of the status bar icons by. A value of 1 means no scaling. -->
- - <item name="status_bar_icon_scale_factor" format="float" type="dimen">1.0</item>
- + <item name="status_bar_icon_scale_factor" format="float" type="dimen">1.8</item>
- <dimen name="group_overflow_number_size">@*android:dimen/notification_text_size</dimen>
- <dimen name="group_overflow_number_size_dark">16sp</dimen>
- @@ -186,7 +186,7 @@
- <dimen name="snooze_option_padding">8dp</dimen>
- //修改状态栏中通知图标的大小
- <!-- size at which Notification icons will be drawn in the status bar -->
- - <dimen name="status_bar_icon_drawing_size">15dp</dimen>
- + <dimen name="status_bar_icon_drawing_size">30dp</dimen>
- <!-- size at which Notification icons will be drawn on Ambient Display -->
- <dimen name="status_bar_icon_drawing_size_dark">@*android:dimen/notification_header_icon_size_ambient</dimen>
- @@ -575,18 +575,18 @@
- <dimen name="qs_time_collapsed_size">14sp</dimen>
- //修改状态栏显示电量百分比字体大小(已经修改为显示电压)
- <!-- The font size of the time when expanded in QS -->
- - <dimen name="qs_time_expanded_size">14sp</dimen>
- + <dimen name="qs_time_expanded_size">28sp</dimen>
- <!-- The font size of the "emergency calls only" label in QS -->
- <dimen name="qs_emergency_calls_only_text_size">12sp</dimen>
- //修改状态栏显示日期字体大小
- <!-- The font size of the date in QS -->
- - <dimen name="qs_date_collapsed_size">14sp</dimen>
- + <dimen name="qs_date_collapsed_size">28sp</dimen>
- <!-- Amount the date/time move when emergency calls only is present -->
- <dimen name="qs_date_time_translation">8dp</dimen>
- //修改状态栏电池电量文本之前填充空白
- <!-- Padding before battery level text in status bar, QS, and Keyguard -->
- - <dimen name="battery_level_padding_start">4dp</dimen>
- + <dimen name="battery_level_padding_start">8dp</dimen>
- <!-- The top padding of the clear all button -->
- <dimen name="clear_all_padding_top">12dp</dimen>