summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2014-07-17 17:05:46 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-17 17:05:46 +0000
commitd685b349566c11df410133d715f5ebc7e37117e8 (patch)
treed8d8ce5897575f9410edf89ba5fd8b629a7088bb /packages
parenteaf2322589e30a07c60c43f41f9bd860a91bf738 (diff)
parent5cb7dde7acde2382b8aaecb6f884c071fc8d0848 (diff)
downloadframeworks_base-d685b349566c11df410133d715f5ebc7e37117e8.zip
frameworks_base-d685b349566c11df410133d715f5ebc7e37117e8.tar.gz
frameworks_base-d685b349566c11df410133d715f5ebc7e37117e8.tar.bz2
am f693c9c3: am 3e7b4279: Merge "Update QS user switcher colors to spec" into lmp-dev
* commit 'f693c9c3e595d5a5e19b5234a4999b7fe84bb976': Update QS user switcher colors to spec
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/color/qs_user_detail_name.xml22
-rw-r--r--packages/SystemUI/res/drawable/ic_account_circle_qs.xml22
-rw-r--r--packages/SystemUI/res/drawable/ic_account_circle_qs_muted.xml37
-rw-r--r--packages/SystemUI/res/layout/qs_user_detail_item.xml3
-rw-r--r--packages/SystemUI/res/values/colors.xml1
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java13
7 files changed, 98 insertions, 2 deletions
diff --git a/packages/SystemUI/res/color/qs_user_detail_name.xml b/packages/SystemUI/res/color/qs_user_detail_name.xml
new file mode 100644
index 0000000..8ddb9be
--- /dev/null
+++ b/packages/SystemUI/res/color/qs_user_detail_name.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ ~ Copyright (C) 2014 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_activated="true" android:color="#ffffffff" />
+ <item android:color="#66ffffff" /> <!-- 40% white -->
+</selector> \ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/ic_account_circle_qs.xml b/packages/SystemUI/res/drawable/ic_account_circle_qs.xml
new file mode 100644
index 0000000..0d5cd2e
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_account_circle_qs.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ ~ Copyright (C) 2014 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_activated="true" android:drawable="@drawable/ic_account_circle" />
+ <item android:drawable="@drawable/ic_account_circle_qs_muted" />
+</selector>
diff --git a/packages/SystemUI/res/drawable/ic_account_circle_qs_muted.xml b/packages/SystemUI/res/drawable/ic_account_circle_qs_muted.xml
new file mode 100644
index 0000000..afcddf1
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_account_circle_qs_muted.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ ~ Copyright (C) 2014 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
+ -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android" >
+ <size
+ android:width="24dp"
+ android:height="24dp"/>
+
+ <viewport
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"/>
+
+ <group
+ android:scaleX="1.2"
+ android:scaleY="1.2"
+ android:pivotX="12.0"
+ android:pivotY="12.0">
+ <path
+ android:fill="@color/qs_user_detail_icon_muted"
+ android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM12.0,5.0c1.7,0.0 3.0,1.3 3.0,3.0c0.0,1.7 -1.3,3.0 -3.0,3.0c-1.7,0.0 -3.0,-1.3 -3.0,-3.0C9.0,6.3 10.3,5.0 12.0,5.0zM12.0,19.2c-2.5,0.0 -4.7,-1.3 -6.0,-3.2c0.0,-2.0 4.0,-3.1 6.0,-3.1c2.0,0.0 6.0,1.1 6.0,3.1C16.7,17.9 14.5,19.2 12.0,19.2z"/>
+ </group>
+</vector>
diff --git a/packages/SystemUI/res/layout/qs_user_detail_item.xml b/packages/SystemUI/res/layout/qs_user_detail_item.xml
index 00b3645..29d92e5 100644
--- a/packages/SystemUI/res/layout/qs_user_detail_item.xml
+++ b/packages/SystemUI/res/layout/qs_user_detail_item.xml
@@ -16,6 +16,7 @@
~ limitations under the License
-->
+<!-- LinearLayout -->
<com.android.systemui.qs.tiles.UserDetailItemView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res-auto"
@@ -39,6 +40,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
- android:text="@string/guest_nickname"/>
+ android:textColor="@color/qs_user_detail_name" />
</com.android.systemui.qs.tiles.UserDetailItemView> \ No newline at end of file
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index adab243..a7f894c 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -46,6 +46,7 @@
<color name="data_usage_graph_track">#33FFFFFF</color><!-- 20% white -->
<color name="data_usage_graph_warning">#FFFFFFFF</color>
<color name="status_bar_clock_color">#FFFFFFFF</color>
+ <color name="qs_user_detail_icon_muted">#4DB0BEC5</color> <!-- 30% blue grey 200-->
<!-- Tint color for the content on the notification overflow card. -->
<color name="keyguard_overflow_content_color">#ff686868</color>
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java
index ec5f28c..3c647ed 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java
@@ -89,7 +89,7 @@ public class UserDetailView extends GridView {
name = item.info.name;
}
if (item.picture == null) {
- v.bind(name, mContext.getDrawable(R.drawable.ic_account_circle));
+ v.bind(name, mContext.getDrawable(R.drawable.ic_account_circle_qs));
} else {
v.bind(name, item.picture);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java
index 6f2642a..93561aa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java
@@ -216,4 +216,17 @@ public class UserAvatarView extends View {
super.invalidateDrawable(dr);
}
}
+
+ @Override
+ protected boolean verifyDrawable(Drawable who) {
+ return who == mDrawable || super.verifyDrawable(who);
+ }
+
+ @Override
+ protected void drawableStateChanged() {
+ super.drawableStateChanged();
+ if (mDrawable != null && mDrawable.isStateful()) {
+ mDrawable.setState(getDrawableState());
+ }
+ }
}