summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Fabian Kozynski <kozynski@google.com> 2019-02-25 20:43:53 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-02-25 20:43:53 +0000
commit31bb2ecb4111fb5facdffb5ce64aa723f87f7677 (patch)
tree5dfb63b0e251bee544ba99f5a22033597caea455
parent65ccc9b173f9e8430f52909fd7cd6306e30bcb8a (diff)
parentf80234c19097f65ef4fe05026b544eeeecf4ee93 (diff)
Merge "Fix visual styles in QSCustomizer and CarrierText"
-rw-r--r--packages/SystemUI/res/drawable/qs_customize_tile_decoration.xml17
-rw-r--r--packages/SystemUI/res/drawable/qs_customizer_background_primary.xml2
-rw-r--r--packages/SystemUI/res/drawable/qs_customizer_toolbar.xml2
-rw-r--r--packages/SystemUI/res/layout/keyguard_status_bar.xml2
-rw-r--r--packages/SystemUI/res/layout/qs_customize_divider.xml1
-rw-r--r--packages/SystemUI/res/layout/qs_customize_header.xml1
-rw-r--r--packages/SystemUI/res/layout/qs_customize_panel_content.xml3
-rw-r--r--packages/SystemUI/res/values-night/colors.xml6
-rw-r--r--packages/SystemUI/res/values/colors.xml19
-rw-r--r--packages/SystemUI/res/values/styles.xml11
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java10
12 files changed, 57 insertions, 22 deletions
diff --git a/packages/SystemUI/res/drawable/qs_customize_tile_decoration.xml b/packages/SystemUI/res/drawable/qs_customize_tile_decoration.xml
new file mode 100644
index 000000000000..f086cec01234
--- /dev/null
+++ b/packages/SystemUI/res/drawable/qs_customize_tile_decoration.xml
@@ -0,0 +1,17 @@
+<!--
+ Copyright (C) 2019 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.
+-->
+<color xmlns:android="http://schemas.android.com/apk/res/android"
+ android:color="@color/qs_customize_decoration"/> \ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/qs_customizer_background_primary.xml b/packages/SystemUI/res/drawable/qs_customizer_background_primary.xml
index abe1429697ac..215dee41d548 100644
--- a/packages/SystemUI/res/drawable/qs_customizer_background_primary.xml
+++ b/packages/SystemUI/res/drawable/qs_customizer_background_primary.xml
@@ -15,7 +15,7 @@
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android">
<shape>
- <solid android:color="?android:attr/colorPrimary"/>
+ <solid android:color="@color/qs_customize_background"/>
<corners android:radius="?android:attr/dialogCornerRadius" />
</shape>
</inset>
diff --git a/packages/SystemUI/res/drawable/qs_customizer_toolbar.xml b/packages/SystemUI/res/drawable/qs_customizer_toolbar.xml
index 557cae150303..648d45b4f903 100644
--- a/packages/SystemUI/res/drawable/qs_customizer_toolbar.xml
+++ b/packages/SystemUI/res/drawable/qs_customizer_toolbar.xml
@@ -15,7 +15,7 @@
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android">
<shape>
- <solid android:color="?android:attr/colorSecondary"/>
+ <solid android:color="@color/qs_customize_background"/>
<corners
android:topLeftRadius="?android:attr/dialogCornerRadius"
android:topRightRadius="?android:attr/dialogCornerRadius" />
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index 5b9816d91965..66c0c5c275ed 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -71,7 +71,7 @@
android:gravity="center_vertical"
android:ellipsize="marquee"
android:textDirection="locale"
- android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textAppearance="@style/TextAppearance.StatusBar.Clock"
android:textColor="?attr/wallpaperTextColorSecondary"
android:singleLine="true"
systemui:showMissingSim="true"
diff --git a/packages/SystemUI/res/layout/qs_customize_divider.xml b/packages/SystemUI/res/layout/qs_customize_divider.xml
index 6fcfa8d27a7a..d6664fefe2da 100644
--- a/packages/SystemUI/res/layout/qs_customize_divider.xml
+++ b/packages/SystemUI/res/layout/qs_customize_divider.xml
@@ -24,5 +24,4 @@
android:paddingTop="20dp"
android:paddingBottom="13dp"
android:textAppearance="@style/TextAppearance.QSEdit.Headers"
- android:textColor="?android:attr/colorAccent"
android:text="@string/drag_to_add_tiles" />
diff --git a/packages/SystemUI/res/layout/qs_customize_header.xml b/packages/SystemUI/res/layout/qs_customize_header.xml
index d54dfee8c670..58066a3ef19c 100644
--- a/packages/SystemUI/res/layout/qs_customize_header.xml
+++ b/packages/SystemUI/res/layout/qs_customize_header.xml
@@ -24,5 +24,4 @@
android:gravity="center"
android:minHeight="@dimen/qs_customize_header_min_height"
android:textAppearance="@style/TextAppearance.QSEdit.Headers"
- android:textColor="?android:attr/colorAccent"
android:text="@string/drag_to_rearrange_tiles" /> \ No newline at end of file
diff --git a/packages/SystemUI/res/layout/qs_customize_panel_content.xml b/packages/SystemUI/res/layout/qs_customize_panel_content.xml
index 87b455129835..09f512f72f84 100644
--- a/packages/SystemUI/res/layout/qs_customize_panel_content.xml
+++ b/packages/SystemUI/res/layout/qs_customize_panel_content.xml
@@ -37,7 +37,8 @@
android:layout_height="wrap_content"
android:background="@drawable/qs_customizer_toolbar"
android:navigationContentDescription="@*android:string/action_bar_up_description"
- style="?android:attr/toolbarStyle" />
+ style="@style/QSCustomizeToolbar"
+ />
<androidx.recyclerview.widget.RecyclerView
android:id="@android:id/list"
diff --git a/packages/SystemUI/res/values-night/colors.xml b/packages/SystemUI/res/values-night/colors.xml
index 2c5120dd06f3..5803bf129c24 100644
--- a/packages/SystemUI/res/values-night/colors.xml
+++ b/packages/SystemUI/res/values-night/colors.xml
@@ -41,4 +41,10 @@
<!-- The color of the text inside a notification -->
<color name="notification_primary_text_color">@*android:color/notification_primary_text_color_dark</color>
+
+ <!-- The color of the background in the top part of QSCustomizer -->
+ <color name="qs_customize_background">@color/GM2_grey_900</color>
+
+ <!-- The color of the background in the bottom part of QSCustomizer -->
+ <color name="qs_customize_decoration">@color/GM2_grey_800</color>
</resources> \ No newline at end of file
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index d5f29badd893..0e4ffee81165 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -35,6 +35,8 @@
<color name="status_bar_clock_color">#FFFFFFFF</color>
<color name="qs_user_detail_icon_muted">#FFFFFFFF</color> <!-- not so muted after all -->
<color name="qs_tile_disabled_color">#9E9E9E</color> <!-- 38% black -->
+ <color name="qs_customize_background">@color/GM2_grey_50</color>
+ <color name="qs_customize_decoration">@color/GM2_grey_100</color>
<!-- Tint color for the content on the notification overflow card. -->
<color name="keyguard_overflow_content_color">#ff686868</color>
@@ -72,7 +74,7 @@
<color name="notification_primary_text_color">@*android:color/notification_primary_text_color_light</color>
<!-- The "inside" of a notification, reached via longpress -->
- <color name="notification_guts_bg_color">#f8f9fa</color>
+ <color name="notification_guts_bg_color">@color/GM2_grey_50</color>
<color name="assist_orb_color">#ffffff</color>
@@ -123,7 +125,7 @@
<color name="zen_introduction">#ffffffff</color>
- <color name="smart_reply_button_text">#5F6368</color>
+ <color name="smart_reply_button_text">@color/GM2_grey_700</color>
<color name="smart_reply_button_text_dark_bg">@*android:color/notification_primary_text_color_dark</color>
<color name="smart_reply_button_background">#ffffffff</color>
<color name="smart_reply_button_stroke">#ffdadce0</color>
@@ -134,4 +136,17 @@
<!-- Logout button -->
<color name="logout_button_bg_color">#ccffffff</color>
+
+ <!-- GM2 colors -->
+ <color name="GM2_grey_50">#F8F9FA</color>
+ <color name="GM2_grey_100">#F1F3F4</color>
+ <color name="GM2_grey_200">#E8EAED</color>
+ <color name="GM2_grey_300">#DADCE0</color>
+ <color name="GM2_grey_400">#BDC1C6</color>
+ <color name="GM2_grey_500">#9AA0A6</color>
+ <color name="GM2_grey_600">#80868B</color>
+ <color name="GM2_grey_650">#70757A</color>
+ <color name="GM2_grey_700">#5F6368</color>
+ <color name="GM2_grey_800">#3C4043</color>
+ <color name="GM2_grey_900">#202124</color>
</resources>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 96cdbd38ed0b..1e411cf7f92b 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -458,8 +458,15 @@
</style>
<style name="TextAppearance.QSEdit.Headers"
- parent="@*android:style/TextAppearance.Material.Body2">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ parent="@*android:style/TextAppearance.DeviceDefault.Body2">
+ <item name="android:textSize">11sp</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
+ <item name="android:textAllCaps">true</item>
+ </style>
+
+ <style name="QSCustomizeToolbar" parent="@*android:style/Widget.DeviceDefault.Toolbar">
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:elevation">10dp</item>
</style>
<style name="edit_theme" parent="qs_theme">
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
index 64ad95c6eaea..c209b315b197 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
@@ -38,7 +38,6 @@ import androidx.recyclerview.widget.RecyclerView;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto;
-import com.android.settingslib.Utils;
import com.android.systemui.Dependency;
import com.android.systemui.R;
import com.android.systemui.plugins.qs.QS;
@@ -103,10 +102,6 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene
mToolbar.getMenu().add(Menu.NONE, MENU_RESET, 0,
mContext.getString(com.android.internal.R.string.reset));
mToolbar.setTitle(R.string.qs_edit);
- int accentColor = Utils.getColorAttrDefaultColor(context, android.R.attr.colorAccent);
- mToolbar.setTitleTextColor(accentColor);
- mToolbar.getNavigationIcon().setTint(accentColor);
- mToolbar.getOverflowIcon().setTint(accentColor);
mRecyclerView = findViewById(android.R.id.list);
mTransparentView = findViewById(R.id.customizer_transparent_view);
mTileAdapter = new TileAdapter(getContext());
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
index a29e93a57c69..608f646e77a4 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
@@ -19,9 +19,8 @@ import android.app.AlertDialog.Builder;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
-import android.content.res.TypedArray;
import android.graphics.Canvas;
-import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
@@ -505,13 +504,10 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta
};
private class TileItemDecoration extends ItemDecoration {
- private final ColorDrawable mDrawable;
+ private final Drawable mDrawable;
private TileItemDecoration(Context context) {
- TypedArray ta =
- context.obtainStyledAttributes(new int[]{android.R.attr.colorSecondary});
- mDrawable = new ColorDrawable(ta.getColor(0, 0));
- ta.recycle();
+ mDrawable = context.getDrawable(R.drawable.qs_customize_tile_decoration);
}