Tablet-specific UI updates to user switcher. DO NOT MERGE
- Draw a background pill instead of frame on the keyguard
for the currently active user.
- Set a different text style for the user switcher
Bug: 146426568
Test: Manual inspection
Change-Id: I5cfefbe375bb0f3b7df8729c473867b97578f81f
(cherry picked from commit d457eef32c)
This commit is contained in:
32
packages/SystemUI/res/drawable/rounded_user_switcher_bg.xml
Normal file
32
packages/SystemUI/res/drawable/rounded_user_switcher_bg.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2020 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.
|
||||
-->
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?android:attr/colorControlHighlight">
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="@color/qs_user_detail_avatar_frame" />
|
||||
|
||||
<padding
|
||||
android:left="1dp"
|
||||
android:right="1dp"
|
||||
android:bottom="1dp"
|
||||
android:top="1dp" />
|
||||
|
||||
<corners android:radius="48dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2020 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.
|
||||
-->
|
||||
|
||||
<!-- LinearLayout -->
|
||||
<com.android.systemui.statusbar.policy.KeyguardUserDetailItemView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:sysui="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:gravity="end|center_vertical"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/rounded_user_switcher_bg"
|
||||
sysui:regularTextAppearance="@style/TextAppearance.StatusBar.Expanded.UserSwitcher"
|
||||
sysui:activatedTextAppearance="@style/TextAppearance.StatusBar.Expanded.UserSwitcher.Activated">
|
||||
<TextView android:id="@+id/user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="13dp"
|
||||
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.UserSwitcher"
|
||||
/>
|
||||
<com.android.systemui.statusbar.phone.UserAvatarView android:id="@+id/user_picture"
|
||||
android:layout_width="@dimen/framed_avatar_size"
|
||||
android:layout_height="@dimen/framed_avatar_size"
|
||||
android:contentDescription="@null"
|
||||
sysui:badgeDiameter="18dp"
|
||||
sysui:badgeMargin="1dp" />
|
||||
</com.android.systemui.statusbar.policy.KeyguardUserDetailItemView>
|
||||
@@ -27,8 +27,6 @@
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/ripple_drawable"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
sysui:regularTextAppearance="@style/TextAppearance.StatusBar.Expanded.UserSwitcher"
|
||||
sysui:activatedTextAppearance="@style/TextAppearance.StatusBar.Expanded.UserSwitcher.Activated">
|
||||
<TextView android:id="@+id/user_name"
|
||||
|
||||
@@ -22,4 +22,28 @@
|
||||
<style name="UserDetailView">
|
||||
<item name="numColumns">4</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.StatusBar.Expanded.UserSwitcher">
|
||||
<item name="android:textSize">@dimen/kg_user_switcher_text_size</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
|
||||
<item name="android:textColor">?attr/wallpaperTextColor</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.StatusBar.Expanded.UserSwitcher.Activated">
|
||||
<item name="android:fontWeight">700</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.QS.UserSwitcher">
|
||||
<item name="android:textSize">@dimen/qs_detail_item_primary_text_size</item>
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
<item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.QS.UserSwitcher.Activated">
|
||||
<item name="android:fontWeight">700</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user