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

Commit 29d74e32 authored by Wenbo Jie's avatar Wenbo Jie
Browse files

[DocsUI M3] Update color values for SDK v30

* For some colors which we can't use color attributes
  directly, use static colors for v30, only
  use dynamic tokens for v31 and above.
* Remove some unused colors.
* Remove unnecessary SDK >= 29 check given the min SDK
  is 30 now.

Bug: 402240208
Test: m DocumentsUIGoogle && manual inspection
Flag: com.android.documentsui.flags.use_material3
Change-Id: Ibb9ad92b5380afb25523aefd79f04e37f33d812a
parent 3c82e697
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2024 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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient
        android:startColor="@color/tool_bar_gradient_max"
        android:endColor="@android:color/transparent"
        android:angle="270"
        android:type="linear" >
    </gradient>
</shape>
 No newline at end of file
+2 −18
Original line number Diff line number Diff line
@@ -16,24 +16,8 @@
<resources>
  <!-- ?attr/colorPrimary -->
  <color name="primary">@android:color/system_accent1_200</color>
  <!-- accent 200 -->
  <color name="work_profile_button_stroke_color">
    @*android:color/system_accent1_200
  </color>
  <!-- neutral variant 100 -->
  <color name="fragment_pick_inactive_button_color">
    @*android:color/system_neutral1_800
  </color>
  <!-- neutral 100 -->
  <color name="fragment_pick_inactive_text_color">
    @*android:color/system_neutral1_600
  </color>
  <!-- neutral 600 -->
  <color name="fragment_pick_active_button_color">
    @*android:color/system_neutral2_100
  </color>
  <!-- neutral variant 100 -->
  <color name="fragment_pick_active_text_color">@android:color/black</color>
  <!-- ?attr/colorSurfaceContainerHigh -->
  <color name="color_surface_header">@color/m3_ref_palette_dynamic_neutral_variant17</color>

  <!-- All drag drop badge colors, we can only use system color tokens because there's no theme
       context inside the view.
+17 −6
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
<resources>
    <color name="app_background_color">#202124</color>
    <color name="background_floating">#3C4043</color>
    <color name="nav_bar_translucent">#52000000</color>

    <!-- ?attr/colorPrimary -->
    <color name="primary">#D0BCFF</color>
@@ -26,15 +25,27 @@
    <color name="success">#3CBA5A</color>
    <color name="on_success">#002110</color>

    <color name="error_image_color">@android:color/white</color>
    <!-- ?attr/colorTertiary -->
    <color name="drag_file_counter_background">#EFB8C8</color>
    <!-- ?attr/colorOnTertiary -->
    <color name="drag_file_counter_text_color">#492532</color>
    <!-- ?attr/colorSurfaceDim -->
    <color name="item_drag_shadow_background">#141218</color>
    <!-- ?attr/colorSurfaceContainerLowest -->
    <color name="drag_mime_icon_wrapper_background">#0F0D13</color>
    <!-- ?attr/colorOnSurface -->
    <color name="drag_content_text_color">#E6E0E9</color>
    <!-- ?attr/colorOnError -->
    <color name="drop_icon_reject_symbol_color">#601410</color>
    <!-- ?attr/colorError -->
    <color name="drop_icon_reject_container_background">#F2B8B5</color>

    <color name="edge_effect">@android:color/white</color>
    <color name="error_image_color">@android:color/white</color>

    <color name="list_divider_color">#9aa0a6</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 -->
    <!-- ?attr/colorSurfaceContainerHigh -->
    <color name="color_surface_header">#2B2930</color>

    <!-- TODO(b/379776735): remove this after use_material3 flag is launched. -->
    <color name="search_chip_text_selected_color">@android:color/black</color>
+2 −17
Original line number Diff line number Diff line
@@ -16,23 +16,8 @@
<resources>
  <!-- ?attr/colorPrimary -->
  <color name="primary">@android:color/system_accent1_600</color>
  <!-- primary 600 -->
  <color name="work_profile_button_stroke_color">
    @*android:color/system_accent1_600
  </color>
  <!-- neutral 10 -->
  <color name="fragment_pick_inactive_button_color">
    @*android:color/system_neutral1_100
  </color>
  <!-- neutral 100 -->
  <color name="fragment_pick_inactive_text_color">
    @*android:color/system_neutral1_400
  </color>
  <!-- neutral 400 -->
  <color name="fragment_pick_active_button_color">@*android:color/system_accent1_600
  </color>
  <!-- accent 600 -->
  <color name="fragment_pick_active_text_color">@android:color/white</color>
  <!-- ?attr/colorSurfaceContainerHigh -->
  <color name="color_surface_header">@color/m3_ref_palette_dynamic_neutral_variant92</color>

  <!-- All drag drop badge colors, we can only use system color tokens because there's no theme
       context inside the view.
+7 −12
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@

  <color name="app_background_color">@android:color/white</color>
  <color name="background_floating">@android:color/white</color>
  <!-- TODO(b/379776735): remove this after use_material3 flag is launched. -->
  <color name="nav_bar_translucent">#99FFFFFF</color>

  <!-- ?attr/colorPrimary -->
@@ -58,8 +59,10 @@
  <!-- ?attr/colorError -->
  <color name="drop_icon_reject_container_background">#B3261E</color>

  <!-- TODO(b/379776735): remove this after use_material3 flag is launched. -->
  <color name="tool_bar_gradient_max">#7f000000</color>

  <!-- drag selection box colors -->
  <color name="band_select_background">?attr/colorPrimaryInverse</color>
  <color name="band_select_border">?attr/colorPrimaryContainer</color>

@@ -70,8 +73,6 @@

  <color name="error_image_color">#757575</color>

  <color name="edge_effect">@android:color/black</color>

  <color name="list_divider_color">#1f000000</color>

  <!-- TODO(b/379776735): remove this after use_material3 flag is launched. -->
@@ -79,17 +80,11 @@

  <!-- 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.
       use the theme attribute (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="work_profile_button_stroke_color">@color/primary</color>

  <color name="fragment_pick_inactive_button_color">#E0E0E0</color>
  <color name="fragment_pick_inactive_text_color">#5F6368</color>
  <color name="fragment_pick_active_button_color">@color/primary</color>
  <color name="fragment_pick_active_text_color">@android:color/white</color>
  <!-- ?attr/colorSurfaceContainerHigh -->
  <color name="color_surface_header">#ECE6F0</color>

  <!-- TODO(b/379776735): remove this after use_material3 flag is launched. -->
  <color name="search_chip_text_selected_color">@android:color/white</color>
Loading