嵌入式系统移植 - SystemUI : 关键参数解释

说明

本章节主要目的解释 SystemUI 中的关键参数, 主要目录为 res, 次要为 src 目录.
从 xml 文件和 java 源码来逐条列出.

res: Diman

路径: SystemUI/res/values/dimens.xml
描述: 通常用于描述控件之间的距离
关键参数:

<!-- Height of the status bar header bar -->
<dimen name="status_bar_header_height">135dp</dimen>

<!-- Height of the status bar header bar when expanded -->
<dimen name="status_bar_header_height_expanded">135dp</dimen>

<!-- Height of the status bar header bar when on Keyguard -->
<dimen name="status_bar_header_height_keyguard">40dp</dimen>
<dimen name="qs_tile_height">88dp</dimen>
<dimen name="qs_tile_icon_size">24dp</dimen>
<dimen name="qs_tile_text_size">12sp</dimen>
<dimen name="qs_tile_divider_height">1dp</dimen>
<dimen name="qs_panel_padding">16dp</dimen>
<dimen name="qs_dual_tile_height">112dp</dimen>
<dimen name="qs_dual_tile_padding_vertical">8dp</dimen>
<dimen name="qs_dual_tile_padding_horizontal">6dp</dimen>
<dimen name="qs_tile_padding_top">14dp</dimen>
<dimen name="qs_tile_padding_top_large_text">4dp</dimen>
<dimen name="qs_tile_padding_below_icon">12dp</dimen>
<dimen name="qs_tile_padding_bottom">16dp</dimen>
<dimen name="qs_tile_spacing">4dp</dimen>
<dimen name="qs_panel_padding_bottom">8dp</dimen>
<dimen name="qs_detail_item_height">48dp</dimen>
<dimen name="qs_brightness_padding_top">6dp</dimen>
<dimen name="qs_detail_header_text_size">20sp</dimen>
<dimen name="qs_detail_button_text_size">14sp</dimen>
<dimen name="qs_detail_item_primary_text_size">16sp</dimen>
<dimen name="qs_detail_item_secondary_text_size">14sp</dimen>
<dimen name="qs_detail_empty_text_size">14sp</dimen>
<dimen name="qs_data_usage_text_size">14sp</dimen>
<dimen name="qs_data_usage_usage_text_size">36sp</dimen>

res: Color

路径: SystemUI/res/values/colors.xml
描述: 通常用于描述控件的颜色
关键参数:

<color name="qs_batterymeter_frame_color">#FF404040</color>
<color name="system_primary_color">#ff263238</color><!-- blue grey 900 -->
<color name="system_secondary_color">#ff384248</color>
<color name="system_accent_color">#ff80CBC4</color><!-- deep teal 200 -->
<color name="system_warning_color">#fff4511e</color><!-- deep orange 600 -->
<color name="qs_text">#FFFFFFFF</color>
<color name="qs_tile_divider">#29ffffff</color><!-- 16% white -->
<color name="qs_tile_text">#B3FFFFFF</color><!-- 70% white -->
<color name="qs_subhead">#99FFFFFF</color><!-- 60% white -->
<color name="qs_detail_empty">#24B0BEC5</color><!-- 14% blue grey 200 -->
<color name="qs_detail_button">#FFB0BEC5</color><!-- 100% blue grey 200 -->
<color name="qs_detail_button_white">#B3FFFFFF</color><!-- 70% white -->
<color name="qs_detail_transition">#66FFFFFF</color>
<color name="qs_detail_progress_track">#99009688</color><!-- 60% deep teal 500 -->
<color name="data_usage_secondary">#99FFFFFF</color><!-- 60% white -->
<color name="data_usage_graph_track">#33FFFFFF</color><!-- 20% white -->
<color name="data_usage_graph_warning">#FFFFFFFF</color>
<color name="status_bar_clock_color">#FFFFFFFF</color>
<color name="qs_user_detail_icon_muted">#FFFFFFFF</color> <!-- not so muted after all -->

res: Config

路径: SystemUI/res/values/config.xml
描述: 通常用于控件数量和功能开关
关键参数:

<!-- Min alpha % that recent items will fade to while being dismissed -->
<integer name="config_recent_item_min_alpha">3</integer>

<!-- The number of columns in the QuickSettings -->
<integer name="quick_settings_num_columns">3</integer>

<!-- The maximum number of rows in the QuickSettings -->
<integer name="quick_settings_max_rows">4</integer>

<!-- The maximum number of rows in the QuickSettings when on the keyguard -->
<integer name="quick_settings_max_rows_keyguard">3</integer>

<!-- The number of columns that the top level tiles span in the QuickSettings -->
<integer name="quick_settings_user_time_settings_tile_span">1</integer>

<!-- The default tiles to display in QuickSettings -->
<string name="quick_settings_tiles_default" translatable="false">
    wifi,bt,inversion,dnd,cell,airplane,rotation,flashlight,location,cast,hotspot
</string>

<!-- The tiles to display in QuickSettings -->
<string name="quick_settings_tiles" translatable="false">default</string>

与之相关 - 修改实例

与之相关 - 修改实例

发布了53 篇原创文章 · 获赞 19 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/qq_33443989/article/details/103063702