Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 841d529f authored by Chris Göllner's avatar Chris Göllner Committed by Android (Google) Code Review
Browse files

Merge "Improve readability of status bar on high res and low density displays" into main

parents f7b7eba5 cb13c664
Loading
Loading
Loading
Loading
+61 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/assets/res/any/dimens.xml
**
** Copyright 2025, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
    <!--
        The dimensions in this file are all 2x of their original value in the values/dimens.xml
        file.
        If adding new dimension resources, please add me here with 2x of their original value.
    -->

    <!-- The default height of the status bar used in {@link SystemBarUtils#getStatusBarHeight} to
         calculate the status bar height. -->
    <dimen name="status_bar_height_default">48dp</dimen>
    <!-- Height of the status bar.
         Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
         -->
    <dimen name="status_bar_height">@dimen/status_bar_height_portrait</dimen>
    <!-- Height of the status bar in portrait.
         Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
         -->
    <dimen name="status_bar_height_portrait">48dp</dimen>
    <!-- Height of the status bar in landscape.
         Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
         -->
    <dimen name="status_bar_height_landscape">@dimen/status_bar_height_portrait</dimen>

    <!-- Original dp height of notification icons in the status bar  -->
    <dimen name="status_bar_icon_size">44dip</dimen>
    <!-- New sp height of notification icons in the status bar  -->
    <dimen name="status_bar_icon_size_sp">44sp</dimen>
    <!-- Desired size of system icons in status bar. -->
    <dimen name="status_bar_system_icon_size">30dp</dimen>
    <!-- Intrinsic size of most system icons in status bar. This is the default value that
         is used if a Drawable reports an intrinsic size of 0. -->
    <dimen name="status_bar_system_icon_intrinsic_size">34dp</dimen>
    <!-- Size of the giant number (unread count) in the notifications -->
    <dimen name="status_bar_content_number_size">96sp</dimen>
    <!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
    <dimen name="status_bar_edge_ignore">10dp</dimen>

    <!-- The maximum size of the small notification icon. -->
    <dimen name="notification_small_icon_size">96dp</dimen>
    <!-- The maximum size of the small notification icon on low memory devices. -->
    <dimen name="notification_small_icon_size_low_ram">@dimen/notification_small_icon_size</dimen>
</resources>
+181 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 * Copyright (c) 2025, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
*/
-->
<resources>
    <!--
        The dimensions in this file are all 2x of their original value in the values/dimens.xml
        file.
        If adding new dimension resources, please add me here with 2x of their original value.
    -->

    <!-- Height of the system icons container view in the status bar -->
    <dimen name="status_bar_system_icons_height">@dimen/status_bar_icon_size_sp</dimen>

    <!-- New sp height of notification icons in the status bar -->
    <dimen name="status_bar_icon_size_sp">@*android:dimen/status_bar_icon_size_sp</dimen>
    <!-- Original dp height of notification icons in the status bar -->
    <dimen name="status_bar_icon_size">@*android:dimen/status_bar_icon_size</dimen>
    <dimen name="status_bar_bindable_icon_size">40sp</dimen>
    <dimen name="status_bar_bindable_icon_padding">4sp</dimen>

    <!-- Default horizontal drawable padding for status bar icons. -->
    <dimen name="status_bar_horizontal_padding">5sp</dimen>

    <!-- Height of the battery icon in the status bar. -->
    <dimen name="status_bar_battery_icon_height">26.0sp</dimen>

    <!-- Width of the battery icon in the status bar. The battery drawable assumes a 12x20 canvas,
    so the width of the icon should be 13.0sp * (12.0 / 20.0) -->
    <dimen name="status_bar_battery_icon_width">15.6sp</dimen>

    <!-- Original canvas is 24x14. These dimens reflect that ratio, with 12sp height instead  -->
    <dimen name="status_bar_battery_unified_icon_width">41.2sp</dimen>
    <dimen name="status_bar_battery_unified_icon_height">24sp</dimen>

    <!-- The battery icon is 13sp tall, but the other system icons are 15sp tall (see
         @*android:dimen/status_bar_system_icon_size) with some top and bottom padding embedded in
         the drawables themselves. So, the battery icon may need an extra 1dp of spacing so that its
         bottom still aligns with the bottom of all the other system icons. See b/258672854. -->
    <dimen name="status_bar_battery_extra_vertical_spacing">2sp</dimen>

    <!-- The font size for the clock in the status bar. -->
    <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">8dp</dimen>

    <!-- The end padding for the clock in the status bar. -->
    <dimen name="status_bar_clock_end_padding">8dp</dimen>

    <!-- Starting padding for a left-aligned status bar clock -->
    <dimen name="status_bar_left_clock_starting_padding">0dp</dimen>

    <!-- End padding for left-aligned status bar clock -->
    <dimen name="status_bar_left_clock_end_padding">4sp</dimen>

    <!-- Margins before/after the new wifi icon -->
    <dimen name="status_bar_wifi_signal_horizontal_margin">6sp</dimen>

    <!-- Spacing after the wifi signals that is present if there are any icons following it. -->
    <dimen name="status_bar_wifi_signal_spacer_width">5sp</dimen>

    <!-- Size of the view displaying the wifi inout icon in the status bar. -->
    <dimen name="status_bar_wifi_inout_container_size">34sp</dimen>
    <!-- Size of the view displaying the wifi signal icon in the status bar. This value should
        match the core/status_bar_system_icon_size and change to sp unit -->
    <dimen name="status_bar_wifi_signal_size">30sp</dimen>
    <dimen name="status_bar_wifi_signal_height_updated">24sp</dimen>

    <!-- Size of the view displaying the mobile inout icon in the status bar. -->
    <dimen name="status_bar_mobile_inout_container_size">34sp</dimen>
    <!-- Size of the view displaying the mobile signal icon in the status bar. This value should
        match the core/status_bar_system_icon_size and change to sp unit -->
    <dimen name="status_bar_mobile_signal_size">30sp</dimen>
    <dimen name="status_bar_mobile_signal_size_updated">24sp</dimen>

    <!-- Size of the view displaying the mobile signal icon in the status bar. This value should
        match the viewport height of mobile signal drawables such as ic_lte_mobiledata
        Note: can be removed once new_status_bar_icons is rolled out -->
    <dimen name="status_bar_mobile_type_size">32sp</dimen>
    <!-- Size of the view that contains the network type. Should be equal to
        status_bar_mobile_type_size + 2, to account for 1sp top and bottom padding
        Note: can be removed once new_status_bar_icons is rolled out -->
    <dimen name="status_bar_mobile_container_height">36sp</dimen>
    <!-- Corner radius for the background of the network type indicator. Should be equal to
        status_bar_mobile_container_height / 2
        Note: can be removed once new_status_bar_icons is rolled out -->
    <dimen name="status_bar_mobile_container_corner_radius">18sp</dimen>

    <!-- Start-side margin for the mobile container (before the RAT or triangle) -->
    <dimen name="status_bar_mobile_container_margin_start">6sp</dimen>
    <dimen name="status_bar_mobile_container_margin_end">6sp</dimen>

    <!-- Size of the view displaying the mobile signal icon in the status bar. This value should
        match the viewport height of mobile signal drawables such as ic_lte_mobiledata -->
    <dimen name="status_bar_mobile_type_size_updated">24sp</dimen>
    <!-- Size of the view that contains the network type. Should be equal to
   status_bar_mobile_type_size + 2, to account for 1sp top and bottom padding -->
    <dimen name="status_bar_mobile_container_height_updated">23sp</dimen>
    <dimen name="status_bar_mobile_type_container_margin_end">12sp</dimen>
    <dimen name="status_bar_end_side_roam_icon_margin_start">4sp</dimen>
    <!-- Corner radius for the background of the network type indicator. Should be equal to
        status_bar_mobile_container_height / 2 -->
    <dimen name="status_bar_mobile_container_corner_radius_updated">14sp</dimen>

    <!-- Size of the view displaying the mobile roam icon in the status bar. This value should
        match the viewport size of drawable stat_sys_roaming -->
    <dimen name="status_bar_mobile_roam_size">16sp</dimen>
    <!-- Size of the roaming indicator. This indicator is positioned at the end of the mobile
        group -->
    <dimen name="status_bar_mobile_roam_size_updated">20sp</dimen>

    <!-- Spacing before the airplane mode icon if there are any icons preceding it. -->
    <dimen name="status_bar_airplane_spacer_width">8sp</dimen>

    <!-- Spacing between system icons. -->
    <dimen name="status_bar_system_icon_spacing">0sp</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>

    <!-- End margin for the RSSI status icon of a device connected via bluetooth. -->
    <dimen name="status_bar_connected_device_signal_margin_end">32dp</dimen>

    <!-- The size of a bluetooth indicator icon that displays next to the RSSI status icon. -->
    <dimen name="status_bar_connected_device_bt_indicator_size">34dp</dimen>

    <!-- size at which Notification icons will be drawn in the status bar -->
    <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">36dp</dimen>

    <!-- opacity at which Notification icons will be drawn in the status bar -->
    <item type="dimen" name="status_bar_icon_drawing_alpha">90%</item>

    <!-- paddings for container with status icons and battery -->
    <!-- padding start is a bit smaller than end to account for status icon margin-->
    <dimen name="status_bar_icons_padding_start">6dp</dimen>

    <dimen name="status_bar_icons_padding_end">8dp</dimen>
    <dimen name="status_bar_icons_padding_bottom">0dp</dimen>
    <dimen name="status_bar_icons_padding_top">0dp</dimen>

    <!-- gap on either side of status bar notification icons -->
    <dimen name="status_bar_icon_horizontal_margin">0sp</dimen>

    <!-- the padding on the start of the statusbar -->
    <dimen name="status_bar_padding_start">8dp</dimen>

    <!-- the padding on the end of the statusbar -->
    <dimen name="status_bar_padding_end">8dp</dimen>

    <!-- the padding on the top of the statusbar (usually 0) -->
    <dimen name="status_bar_padding_top">0dp</dimen>

    <!-- Height of the status bar header bar when on Keyguard -->
    <dimen name="status_bar_header_height_keyguard">80dp</dimen>

    <!-- end padding for battery icon in status bar -->
    <dimen name="status_bar_battery_end_padding">0dp</dimen>

    <!-- Status bar user chip -->
    <dimen name="status_bar_user_chip_avatar_size">32dp</dimen>
    <!-- below also works as break between user chip and hover state of status icons -->
    <dimen name="status_bar_user_chip_end_margin">16dp</dimen>
    <dimen name="status_bar_user_chip_text_size">24sp</dimen>
</resources>