Update DocumentsUI to use theme colors.
Properly assigns the app's colors for primary, primaryDark, accent, etc to the colors used by the framework. Moves a couple colors that are alternate shades of the accent color into the framework for ease of overlaying. Deletes a few unused colors as well. Finally, fixes a bug where colorControlActivated was not being properly set due to the theme depending upon AppCompat. To workaround this undefined behavior, we explicitly set colorControlActivated to colorAccent which is what the framework sets it to. Change-Id: Ie0cba19b1b83a21f65692102df91bf4daf27dc44 Fixes: 29581883
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
<color name="tertiary_device_default_settings">@color/tertiary_material_settings</color>
|
||||
<color name="quaternary_device_default_settings">@color/quaternary_material_settings</color>
|
||||
|
||||
<color name="accent_device_default_700">@color/material_deep_teal_700</color>
|
||||
<color name="accent_device_default_light">@color/accent_material_light</color>
|
||||
<color name="accent_device_default_dark">@color/accent_material_dark</color>
|
||||
</resources>
|
||||
<color name="accent_device_default_50">@color/material_deep_teal_50</color>
|
||||
</resources>
|
||||
|
||||
@@ -81,10 +81,12 @@
|
||||
<color name="material_grey_100">#fff5f5f5</color>
|
||||
<color name="material_grey_50">#fffafafa</color>
|
||||
|
||||
<color name="material_deep_teal_50">#ffe0f2f1</color>
|
||||
<color name="material_deep_teal_100">#ffb2dfdb</color>
|
||||
<color name="material_deep_teal_200">#ff80cbc4</color>
|
||||
<color name="material_deep_teal_300">#ff4db6ac</color>
|
||||
<color name="material_deep_teal_500">#ff009688</color>
|
||||
<color name="material_deep_teal_700">#ff00796b</color>
|
||||
|
||||
<color name="material_blue_grey_200">#ffb0bec5</color>
|
||||
<color name="material_blue_grey_700">#ff455a64</color>
|
||||
|
||||
@@ -19,6 +19,6 @@ Copyright (C) 2016 The Android Open Source Project
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF009688"
|
||||
android:fillColor="?android:attr/colorAccent"
|
||||
android:pathData="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10,-4.48 10,-10S17.52 2 12 2zm-2 15l-5,-5 1.41,-1.41L10 14.17l7.59,-7.59L19 8l-9 9z"/>
|
||||
</vector>
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2015 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>
|
||||
<declare-styleable name="DocumentsTheme">
|
||||
<attr name="colorActionMode" format="color"/>
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -15,9 +15,6 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<color name="material_grey_400">#ffbdbdbd</color>
|
||||
<color name="material_teal_700">#ff00796b</color>
|
||||
|
||||
<!-- This is the window background, but also the background for anything
|
||||
else that needs to manually declare a background matching the "default"
|
||||
app background (e.g. the drawer overlay). -->
|
||||
@@ -26,22 +23,19 @@
|
||||
<color name="directory_background">#fff7f7f7</color>
|
||||
<color name="menu_search_background">@android:color/transparent</color>
|
||||
|
||||
<color name="primary_dark">@*android:color/primary_dark_material_dark</color>
|
||||
<color name="primary">@*android:color/material_blue_grey_900</color>
|
||||
<color name="accent">@*android:color/accent_material_light</color>
|
||||
<color name="accent_dark">@*android:color/accent_material_dark</color>
|
||||
<color name="action_mode">@color/material_grey_400</color>
|
||||
<color name="status_bar_color">@*android:color/material_blue_grey_950</color>
|
||||
<color name="primary_dark">@*android:color/primary_dark_device_default_settings</color>
|
||||
<color name="primary">@*android:color/primary_device_default_settings</color>
|
||||
<color name="accent">@*android:color/accent_device_default_light</color>
|
||||
<color name="accent_dark">@*android:color/accent_device_default_dark</color>
|
||||
|
||||
<color name="band_select_background">#88ffffff</color>
|
||||
<color name="band_select_border">#44000000</color>
|
||||
|
||||
<color name="item_doc_background_disabled">#fff4f4f4</color>
|
||||
|
||||
<color name="root_activated_color">@color/material_teal_700</color>
|
||||
<color name="root_activated_color">@*android:color/accent_device_default_700</color>
|
||||
|
||||
<!-- TODO: Would be nice to move this to a color-set, but not sure how to support animation -->
|
||||
<color name="item_doc_background">#fffafafa</color>
|
||||
<color name="item_doc_background_selected">#ffe0f2f1</color>
|
||||
<color name="item_doc_background_disabled">#fff4f4f4</color>
|
||||
<color name="item_doc_background_selected">@*android:color/accent_device_default_50</color>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -28,9 +28,8 @@
|
||||
<item name="android:colorPrimaryDark">@color/primary_dark</item>
|
||||
<item name="android:colorPrimary">@color/primary</item>
|
||||
<item name="android:colorAccent">@color/accent</item>
|
||||
<item name="colorActionMode">@color/action_mode</item>
|
||||
<item name="android:colorControlActivated">?android:attr/colorAccent</item>
|
||||
<item name="android:queryBackground">@color/menu_search_background</item>
|
||||
<item name="android:statusBarColor">@color/status_bar_color</item>
|
||||
|
||||
<item name="android:listDivider">@*android:drawable/list_divider_material</item>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user