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

Commit ff0f9304 authored by Wenbo Jie's avatar Wenbo Jie
Browse files

[DocsUI M3] Update layout for app bar

* Remove the padding top for main container in compact screen.
* Update the app bar background color when it's pinned.
* Use the same padding start/end for Medium/Expanded screens.

Check the bug for before/after comparison.

Bug: 377771946
Test: Manual inpsection
Flag: com.android.documentsui.flags.use_material3
Change-Id: I2768f963265a2c394e39e5be1bca13440ab81e58
parent 19882efc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@
    <color name="list_divider_color">#9aa0a6</color>
    <color name="list_item_selected_background_color">?android:colorSecondary</color>

    <color name="color_surface_header">@color/m3_ref_palette_dynamic_neutral_variant17</color>

    <color name="fragment_pick_active_text_color">#202124</color> <!-- Grey 900 -->

    <!-- TODO(b/379776735): remove this after M3 uplift -->
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
<resources>
    <dimen name="main_container_padding_start">@dimen/space_medium_1</dimen>
    <dimen name="main_container_padding_end">@dimen/space_medium_1</dimen>
    <dimen name="main_container_padding_top">@dimen/space_extra_small_4</dimen>
    <!-- Main margin is set by main_container_padding_start for the menu button, here is for
    the space between the button the text/title, but since on this layout we don't have the button,
    we zero here, to avoid pushing the title further. -->
+0 −2
Original line number Diff line number Diff line
@@ -28,8 +28,6 @@
    <dimen name="search_bar_text_margin_end">24dp</dimen>
    <dimen name="search_bar_icon_padding">16dp</dimen>

    <dimen name="main_container_padding_start">@dimen/space_medium_5</dimen>
    <dimen name="main_container_padding_end">@dimen/space_medium_5</dimen>
    <dimen name="main_container_padding_top">@dimen/space_extra_small_6</dimen>

    <dimen name="toolbar_padding_end">@dimen/space_small_3</dimen>
+6 −1
Original line number Diff line number Diff line
@@ -56,7 +56,12 @@
  <color name="list_divider_color">#1f000000</color>
  <color name="list_item_selected_background_color">?android:colorSecondary
  </color>
  <color name="color_surface_header">@color/app_background_color</color>
  <!-- This is used when the app bar is in pinned mode inside the CollapsingToolbarLayout.
       The code in NavigationViewManager assume the value should be a plain color value so we can't
       use the theme attribute "?attr/colorSurfaceContainerHigh" (which is a reference) here, hence
       using the mapped system color in both here and dark mode.
  -->
  <color name="color_surface_header">@color/m3_ref_palette_dynamic_neutral_variant92</color>

  <color name="tab_selected_text_color">@color/primary</color>
  <color name="work_profile_button_stroke_color">@color/primary</color>
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@
    <dimen name="search_chip_group_padding_vertical">@dimen/space_extra_small_4</dimen>
    <dimen name="main_container_padding_start">@dimen/space_small_4</dimen>
    <dimen name="main_container_padding_end">@dimen/space_small_4</dimen>
    <dimen name="main_container_padding_top">@dimen/space_extra_small_4</dimen>
    <dimen name="main_container_padding_top">0dp</dimen>
    <dimen name="layout_padding_top">@dimen/space_small_1</dimen>
    <dimen name="layout_padding_bottom">@dimen/space_small_1</dimen>
    <dimen name="layout_padding_end">@dimen/space_small_1</dimen>