Merge "Update QS user switcher colors to spec" into lmp-dev
This commit is contained in:
22
packages/SystemUI/res/color/qs_user_detail_name.xml
Normal file
22
packages/SystemUI/res/color/qs_user_detail_name.xml
Normal file
@@ -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>
|
||||
22
packages/SystemUI/res/drawable/ic_account_circle_qs.xml
Normal file
22
packages/SystemUI/res/drawable/ic_account_circle_qs.xml
Normal file
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user