summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/color/horizontal_breadcrumb_color.xml21
-rw-r--r--res/color/item_doc_grid_border.xml4
-rw-r--r--res/color/item_doc_grid_tint.xml2
-rw-r--r--res/color/item_root_secondary_text.xml6
-rw-r--r--res/color/search_chip_ripple_color.xml10
-rw-r--r--res/color/search_chip_text_color.xml2
-rw-r--r--res/color/sort_list_text.xml2
-rw-r--r--res/drawable/ic_briefcase.xml2
-rw-r--r--res/drawable/ic_check.xml2
-rw-r--r--res/drawable/ic_check_circle.xml2
-rw-r--r--res/drawable/ic_dialog_info.xml2
-rw-r--r--res/drawable/ic_done.xml2
-rw-r--r--res/drawable/list_item_background.xml6
-rw-r--r--res/layout/directory_header.xml4
-rw-r--r--res/layout/drawer_layout.xml2
-rw-r--r--res/layout/item_doc_grid.xml1
-rw-r--r--res/layout/item_doc_header_message.xml1
-rw-r--r--res/layout/item_doc_list.xml14
-rw-r--r--res/layout/navigation_breadcrumb_item.xml1
-rw-r--r--res/values-night/colors.xml6
-rw-r--r--res/values/colors.xml6
-rw-r--r--res/values/overlayable.xml1
-rw-r--r--res/values/styles.xml1
-rw-r--r--res/values/styles_text.xml4
-rw-r--r--src/com/android/documentsui/BreadcrumbHolder.java2
-rw-r--r--src/com/android/documentsui/HorizontalBreadcrumb.java3
-rw-r--r--src/com/android/documentsui/dirlist/DocumentsSwipeRefreshLayout.java4
27 files changed, 61 insertions, 52 deletions
diff --git a/res/color/horizontal_breadcrumb_color.xml b/res/color/horizontal_breadcrumb_color.xml
new file mode 100644
index 000000000..d5a852c0a
--- /dev/null
+++ b/res/color/horizontal_breadcrumb_color.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="true"
+ android:color="?android:colorAccent" />
+ <item android:color="?android:attr/colorControlNormal" />
+</selector>
diff --git a/res/color/item_doc_grid_border.xml b/res/color/item_doc_grid_border.xml
index b535aedc3..592d07634 100644
--- a/res/color/item_doc_grid_border.xml
+++ b/res/color/item_doc_grid_border.xml
@@ -18,10 +18,10 @@
<item
android:state_focused="true"
android:state_selected="false"
- android:color="?android:attr/colorPrimary"/>
+ android:color="?android:attr/colorAccent"/>
<item
android:state_selected="true"
- android:color="?android:attr/colorPrimary"/>
+ android:color="?android:attr/colorAccent"/>
<item
android:color="@android:color/transparent"/>
</selector>
diff --git a/res/color/item_doc_grid_tint.xml b/res/color/item_doc_grid_tint.xml
index 2c48e9658..878afb175 100644
--- a/res/color/item_doc_grid_tint.xml
+++ b/res/color/item_doc_grid_tint.xml
@@ -17,7 +17,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_activated="true"
- android:color="?android:colorPrimary"
+ android:color="?android:colorAccent"
android:alpha=".15" />
<item
android:color="@android:color/transparent" />
diff --git a/res/color/item_root_secondary_text.xml b/res/color/item_root_secondary_text.xml
index 44086ef88..632135ce8 100644
--- a/res/color/item_root_secondary_text.xml
+++ b/res/color/item_root_secondary_text.xml
@@ -16,8 +16,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_focused="true" android:state_activated="true" android:color="?android:colorPrimary" />
- <item android:state_focused="false" android:state_activated="true" android:color="?android:colorPrimary" />
+ <item android:state_focused="true" android:state_activated="true"
+ android:color="?android:colorControlActivated" />
+ <item android:state_focused="false" android:state_activated="true"
+ android:color="?android:colorControlActivated" />
<item android:state_enabled="false" android:alpha="0.5" android:color="?android:textColorSecondary" />
<item android:color="?android:textColorSecondary" />
</selector>
diff --git a/res/color/search_chip_ripple_color.xml b/res/color/search_chip_ripple_color.xml
index 985b6cc7d..0f78a0722 100644
--- a/res/color/search_chip_ripple_color.xml
+++ b/res/color/search_chip_ripple_color.xml
@@ -18,15 +18,15 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Selected. -->
<item android:state_pressed="true" android:state_selected="true"
- android:alpha="0.16" android:color="?android:colorPrimary"/>
+ android:alpha="0.16" android:color="?android:colorSecondary"/>
<item android:state_focused="true" android:state_hovered="true" android:state_selected="true"
- android:alpha="0.16" android:color="?android:colorPrimary"/>
+ android:alpha="0.16" android:color="?android:colorSecondary"/>
<item android:state_focused="true" android:state_selected="true"
- android:alpha="0.12" android:color="?android:colorPrimary"/>
+ android:alpha="0.12" android:color="?android:colorSecondary"/>
<item android:state_hovered="true" android:state_selected="true"
- android:alpha="0.04" android:color="?android:colorPrimary"/>
+ android:alpha="0.04" android:color="?android:colorSecondary"/>
<item android:state_selected="true"
- android:alpha="0.00" android:color="?android:colorPrimary"/>
+ android:alpha="0.00" android:color="?android:colorSecondary"/>
<!-- Unselected. -->
<item android:state_pressed="true" android:alpha="0.16" android:color="?android:textColorSecondary"/>
diff --git a/res/color/search_chip_text_color.xml b/res/color/search_chip_text_color.xml
index 432c4e2e9..262bede41 100644
--- a/res/color/search_chip_text_color.xml
+++ b/res/color/search_chip_text_color.xml
@@ -16,7 +16,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_selected="true" android:color="@color/chip_selected_text"/>
+ <item android:state_selected="true" android:color="?android:colorControlActivated"/>
<item android:state_enabled="true" android:color="?android:textColorSecondary"/>
<item android:state_enabled="false" android:color="?android:textColorSecondary" android:alpha="0.3"/>
</selector> \ No newline at end of file
diff --git a/res/color/sort_list_text.xml b/res/color/sort_list_text.xml
index 16f16a24d..cbe8da6fe 100644
--- a/res/color/sort_list_text.xml
+++ b/res/color/sort_list_text.xml
@@ -16,7 +16,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_checked="true"
- android:color="?android:attr/colorPrimary"/>
+ android:color="?android:attr/colorAccent"/>
<item
android:color="?android:attr/textColorPrimary"/>
</selector> \ No newline at end of file
diff --git a/res/drawable/ic_briefcase.xml b/res/drawable/ic_briefcase.xml
index cf979ac1c..64efd18d9 100644
--- a/res/drawable/ic_briefcase.xml
+++ b/res/drawable/ic_briefcase.xml
@@ -20,6 +20,6 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
- android:fillColor="@color/briefcase_icon_color"
+ android:fillColor="?android:attr/colorAccent"
android:pathData="M20,6h-4L16,4c0,-1.11 -0.89,-2 -2,-2h-4c-1.11,0 -2,0.89 -2,2v2L4,6c-1.11,0 -1.99,0.89 -1.99,2L2,19c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2zM12,15c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM14,6h-4L10,4h4v2z"/>
</vector>
diff --git a/res/drawable/ic_check.xml b/res/drawable/ic_check.xml
index a6df08a93..2f02c9a6c 100644
--- a/res/drawable/ic_check.xml
+++ b/res/drawable/ic_check.xml
@@ -18,7 +18,7 @@ Copyright (C) 2018 The Android Open Source Project
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
- android:tint="?android:attr/colorPrimary">
+ android:tint="?android:colorControlActivated">
<path
android:fillColor="@android:color/white"
android:pathData="vM9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/>
diff --git a/res/drawable/ic_check_circle.xml b/res/drawable/ic_check_circle.xml
index 13b45bd8e..62a4e34b4 100644
--- a/res/drawable/ic_check_circle.xml
+++ b/res/drawable/ic_check_circle.xml
@@ -19,6 +19,6 @@ Copyright (C) 2016 The Android Open Source Project
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="?android:attr/colorPrimary"
+ 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>
diff --git a/res/drawable/ic_dialog_info.xml b/res/drawable/ic_dialog_info.xml
index 2e2447b69..968bb67dd 100644
--- a/res/drawable/ic_dialog_info.xml
+++ b/res/drawable/ic_dialog_info.xml
@@ -19,7 +19,7 @@
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
- android:tint="?android:attr/colorPrimary">
+ android:tint="?android:attr/colorAccent">
<path
android:fillColor="?android:attr/colorBackground"
android:pathData="M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm0.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" />
diff --git a/res/drawable/ic_done.xml b/res/drawable/ic_done.xml
index f8f66b692..299bd177f 100644
--- a/res/drawable/ic_done.xml
+++ b/res/drawable/ic_done.xml
@@ -19,6 +19,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="?android:colorPrimary"
+ android:fillColor="?android:colorAccent"
android:pathData="M9,16.2L4.8,12l-1.4,1.4L9,19 21,7l-1.4,-1.4L9,16.2z"/>
</vector>
diff --git a/res/drawable/list_item_background.xml b/res/drawable/list_item_background.xml
index afbeecd27..a73ae2e2a 100644
--- a/res/drawable/list_item_background.xml
+++ b/res/drawable/list_item_background.xml
@@ -16,16 +16,16 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" >
- <color android:color="?android:colorSecondary"/>
+ <color android:color="@color/list_item_selected_background_color"/>
</item>
<item android:state_selected="true">
- <color android:color="?android:colorSecondary"/>
+ <color android:color="@color/list_item_selected_background_color"/>
</item>
<item android:state_drag_hovered="true">
<color android:color="?android:strokeColor"/>
</item>
<item android:state_selected="false"
android:state_focused="false">
- <color android:color="@color/app_background_color"/>
+ <color android:color="?android:attr/colorBackground"/>
</item>
</selector> \ No newline at end of file
diff --git a/res/layout/directory_header.xml b/res/layout/directory_header.xml
index b7ab7d96a..6a222d5c3 100644
--- a/res/layout/directory_header.xml
+++ b/res/layout/directory_header.xml
@@ -46,8 +46,8 @@
app:tabMaxWidth="0dp"
app:tabGravity="fill"
app:tabMode="fixed"
- app:tabIndicatorColor="@color/tab_indicator_color"
- app:tabSelectedTextColor="@color/tab_indicator_color"
+ app:tabIndicatorColor="?android:attr/colorAccent"
+ app:tabSelectedTextColor="?android:attr/colorAccent"
app:tabTextAppearance="@style/TabTextAppearance"
app:tabTextColor="?android:attr/textColorSecondary"/>
diff --git a/res/layout/drawer_layout.xml b/res/layout/drawer_layout.xml
index 7cb185fad..b5bfc66a1 100644
--- a/res/layout/drawer_layout.xml
+++ b/res/layout/drawer_layout.xml
@@ -88,7 +88,7 @@
android:background="?android:attr/colorBackground"
android:elevation="0dp"
app:titleTextAppearance="@style/DrawerMenuTitle"
- app:titleTextColor="?android:colorPrimary"/>
+ app:titleTextColor="?android:colorAccent"/>
<FrameLayout
android:id="@+id/container_roots"
diff --git a/res/layout/item_doc_grid.xml b/res/layout/item_doc_grid.xml
index 0722a9d16..9159a20d3 100644
--- a/res/layout/item_doc_grid.xml
+++ b/res/layout/item_doc_grid.xml
@@ -50,6 +50,7 @@
<FrameLayout
android:id="@+id/thumbnail"
+ android:background="?android:attr/colorBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content">
diff --git a/res/layout/item_doc_header_message.xml b/res/layout/item_doc_header_message.xml
index 416fbe9c4..4b2cf355f 100644
--- a/res/layout/item_doc_header_message.xml
+++ b/res/layout/item_doc_header_message.xml
@@ -34,6 +34,7 @@
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
+ android:background="?android:attr/colorBackground"
android:orientation="vertical">
<LinearLayout
diff --git a/res/layout/item_doc_list.xml b/res/layout/item_doc_list.xml
index 9238676cf..ce8925dd2 100644
--- a/res/layout/item_doc_list.xml
+++ b/res/layout/item_doc_list.xml
@@ -16,18 +16,13 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/item_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:background="@drawable/list_item_background"
+ android:focusable="true"
android:orientation="vertical">
- <LinearLayout
- android:id="@+id/item_root"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@drawable/list_item_background"
- android:focusable="true"
- android:orientation="horizontal">
-
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -49,6 +44,7 @@
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="match_parent"
+ app:cardBackgroundColor="@android:color/transparent"
app:cardElevation="0dp">
<ImageView
@@ -154,8 +150,6 @@
</LinearLayout>
- </LinearLayout>
-
<View
android:layout_width="match_parent"
android:layout_height="1dp"
diff --git a/res/layout/navigation_breadcrumb_item.xml b/res/layout/navigation_breadcrumb_item.xml
index a424a66ec..93d3feb3f 100644
--- a/res/layout/navigation_breadcrumb_item.xml
+++ b/res/layout/navigation_breadcrumb_item.xml
@@ -40,7 +40,6 @@
android:layout_height="match_parent"
android:maxWidth="275dp"
android:gravity="center_vertical"
- android:duplicateParentState="true"
android:maxLines="1"
android:ellipsize="end"
android:textAppearance="@style/BreadcrumbText"
diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml
index 0bdfdd0b1..169f52f35 100644
--- a/res/values-night/colors.xml
+++ b/res/values-night/colors.xml
@@ -22,19 +22,15 @@
<color name="secondary">#3D8AB4F8</color>
<color name="hairline">#5F6368</color>
- <color name="briefcase_icon_color">#669DF6</color> <!-- Blue 400 -->
- <color name="cross_profile_button_text_color">#669DF6</color> <!-- Blue 400 -->
<color name="empty_state_text">@android:color/white</color>
<color name="error_image_color">@android:color/white</color>
<color name="edge_effect">@android:color/white</color>
- <color name="tab_indicator_color">#669DF6</color> <!-- Blue 400 -->
<!-- AppCompat.textColorSecondary -->
<color name="doc_list_item_subtitle_enabled">#b3ffffff</color>
<color name="doc_list_item_subtitle_disabled">#36ffffff</color>
<color name="list_divider_color">#9aa0a6</color>
-
- <color name="chip_selected_text">#A1C2FA</color> <!-- Blue 200 -->
+ <color name="list_item_selected_background_color">?android:colorSecondary</color>
</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 1688bf64f..1a4d3bcee 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -42,18 +42,14 @@
<color name="shortcut_foreground">#ff3367d6</color>
<color name="shortcut_background">#fff5f5f5</color>
- <color name="briefcase_icon_color">#1A73E8</color>
- <color name="cross_profile_button_text_color">#1A73E8</color>
<color name="empty_state_text">#202124</color>
<color name="error_image_color">#757575</color>
- <color name="tab_indicator_color">#1A73E8</color> <!-- Blue 600 -->
<color name="edge_effect">@android:color/black</color>
<color name="doc_list_item_subtitle_enabled">#5F6368</color> <!-- Gray 700 -->
<color name="doc_list_item_subtitle_disabled">#613c4043</color> <!-- 38% Grey800 -->
<color name="list_divider_color">#1f000000</color>
-
- <color name="chip_selected_text">#3367D6</color> <!-- Blue 700 -->
+ <color name="list_item_selected_background_color">?android:colorSecondary</color>
</resources>
diff --git a/res/values/overlayable.xml b/res/values/overlayable.xml
index 621de83d4..0b334d222 100644
--- a/res/values/overlayable.xml
+++ b/res/values/overlayable.xml
@@ -40,6 +40,7 @@
<!-- START COLOR -->
<item type="color" name="primary"/>
+ <item type="color" name="list_item_selected_background_color"/>
<!-- END COLOR -->
<!-- START DIMEN -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index d35005af2..264f2b4e6 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -85,6 +85,7 @@
<style name="DialogTextButton" parent="@style/Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textAppearance">@style/MaterialButtonTextAppearance</item>
+ <item name="android:textColor">?android:attr/colorAccent</item>
</style>
<style name="EmptyStateButton" parent="@style/Widget.MaterialComponents.Button.TextButton">
diff --git a/res/values/styles_text.xml b/res/values/styles_text.xml
index 8b3273183..0edaca6ae 100644
--- a/res/values/styles_text.xml
+++ b/res/values/styles_text.xml
@@ -96,7 +96,7 @@
</style>
<style name="BreadcrumbText" parent="@style/TextAppearance.Widget.AppCompat.Toolbar.Subtitle">
- <item name="android:textColor">?android:attr/colorControlNormal</item>
+ <item name="android:textColor">@color/horizontal_breadcrumb_color</item>
<item name="android:textSize">14sp</item>
<item name="fontFamily">@string/config_fontFamilyMedium</item>
</style>
@@ -113,7 +113,7 @@
</style>
<style name="EmptyStateButtonTextAppearance">
- <item name="android:textColor">@color/cross_profile_button_text_color</item>
+ <item name="android:textColor">?android:attr/colorAccent</item>
<item name="android:textSize">14sp</item>
<item name="fontFamily">@string/config_fontFamilyMedium</item>
</style>
diff --git a/src/com/android/documentsui/BreadcrumbHolder.java b/src/com/android/documentsui/BreadcrumbHolder.java
index 68c0e6a0e..4baaf9ca5 100644
--- a/src/com/android/documentsui/BreadcrumbHolder.java
+++ b/src/com/android/documentsui/BreadcrumbHolder.java
@@ -27,14 +27,12 @@ public final class BreadcrumbHolder extends RecyclerView.ViewHolder {
protected TextView mTitle;
protected ImageView mArrow;
- protected int mDefaultTextColor;
protected boolean mLast;
public BreadcrumbHolder(View itemView) {
super(itemView);
mTitle = itemView.findViewById(R.id.breadcrumb_text);
mArrow = itemView.findViewById(R.id.breadcrumb_arrow);
- mDefaultTextColor = mTitle.getTextColors().getDefaultColor();
mLast = false;
}
diff --git a/src/com/android/documentsui/HorizontalBreadcrumb.java b/src/com/android/documentsui/HorizontalBreadcrumb.java
index 5cfc65e09..94f0e13f9 100644
--- a/src/com/android/documentsui/HorizontalBreadcrumb.java
+++ b/src/com/android/documentsui/HorizontalBreadcrumb.java
@@ -176,7 +176,6 @@ public final class HorizontalBreadcrumb extends RecyclerView implements Breadcru
public void onBindViewHolder(BreadcrumbHolder holder, int position) {
final int padding = (int) holder.itemView.getResources()
.getDimension(R.dimen.breadcrumb_item_padding);
- final int enableColor = holder.itemView.getContext().getColor(R.color.primary);
final boolean isFirst = position == 0;
// Note that when isFirst is true, there might not be a DocumentInfo on the stack as it
// could be an error state screen accessible from the root info.
@@ -184,7 +183,7 @@ public final class HorizontalBreadcrumb extends RecyclerView implements Breadcru
holder.mTitle.setText(
isFirst ? mEnv.getCurrentRoot().title : mState.stack.get(position).displayName);
- holder.mTitle.setTextColor(isLast ? enableColor : holder.mDefaultTextColor);
+ holder.mTitle.setEnabled(isLast);
holder.mTitle.setPadding(isFirst ? padding * 3 : padding,
padding, isLast ? padding * 2 : padding, padding);
holder.mArrow.setVisibility(isLast ? View.GONE : View.VISIBLE);
diff --git a/src/com/android/documentsui/dirlist/DocumentsSwipeRefreshLayout.java b/src/com/android/documentsui/dirlist/DocumentsSwipeRefreshLayout.java
index a1963645b..4b66b857f 100644
--- a/src/com/android/documentsui/dirlist/DocumentsSwipeRefreshLayout.java
+++ b/src/com/android/documentsui/dirlist/DocumentsSwipeRefreshLayout.java
@@ -42,12 +42,12 @@ public class DocumentsSwipeRefreshLayout extends SwipeRefreshLayout {
public DocumentsSwipeRefreshLayout(Context context, AttributeSet attrs) {
super(context, attrs);
- final int[] styledAttrs = {android.R.attr.colorPrimary};
+ final int[] styledAttrs = {android.R.attr.colorAccent};
TypedArray a = context.obtainStyledAttributes(styledAttrs);
@ColorRes int colorId = a.getResourceId(0, -1);
if (colorId == -1) {
- Log.w(TAG, "Retrive colorPrimary colorId from theme fail, assign R.color.primary");
+ Log.w(TAG, "Retrieve colorAccent colorId from theme fail, assign R.color.primary");
colorId = R.color.primary;
}
a.recycle();