Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3dba81df authored by Peter Kalauskas's avatar Peter Kalauskas Committed by Android (Google) Code Review
Browse files

Merge changes from topic "new-keyguard-user-switcher" into sc-dev

* changes:
  New keyguard user switcher
  Remove MultiUserSwitch from KeyguardStatusBarView
parents 7f893610 1970915c
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -14,14 +14,10 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<com.android.keyguard.AlphaOptimizedLinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/keyguard_user_switcher_inner"
    android:orientation="vertical"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:layout_marginTop="@dimen/status_bar_header_height_keyguard"
    android:layout_gravity="end"
    android:gravity="end"
    android:paddingTop="4dp">
</com.android.keyguard.AlphaOptimizedLinearLayout>

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:state_activated="true"
        android:color="@color/kg_user_switcher_avatar_background" />
    <item android:color="@color/kg_user_switcher_avatar_background" />
</selector>
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright (C) 2021 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
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <stroke
        android:width="@dimen/end_guest_button_border_size"
        android:color="?android:attr/colorControlHighlight" />
    <corners android:radius="@dimen/end_guest_button_corner_radius" />
</shape>
+28 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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"
        android:width="48dp"
        android:height="48dp"
        android:viewportWidth="100"
        android:viewportHeight="100">

    <path
        android:fillColor="@color/kg_user_switcher_avatar_background"
        android:pathData="M50,50m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0"/>

</vector>
+6 −11
Original line number Diff line number Diff line
@@ -43,17 +43,12 @@
            <include layout="@layout/system_icons" />
        </FrameLayout>

        <com.android.systemui.statusbar.phone.MultiUserSwitch android:id="@+id/multi_user_switch"
            android:layout_width="@dimen/multi_user_switch_width_keyguard"
            android:layout_height="match_parent"
            android:background="@drawable/ripple_drawable"
            android:layout_marginEnd="@dimen/multi_user_switch_keyguard_margin">

        <ImageView android:id="@+id/multi_user_avatar"
            android:layout_width="@dimen/multi_user_avatar_keyguard_size"
            android:layout_height="@dimen/multi_user_avatar_keyguard_size"
            android:layout_gravity="center"
            android:scaleType="centerInside"/>
        </com.android.systemui.statusbar.phone.MultiUserSwitch>
    </LinearLayout>

    <Space
+47 −7
Original line number Diff line number Diff line
@@ -14,10 +14,50 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<view xmlns:android="http://schemas.android.com/apk/res/android"
        class="com.android.systemui.statusbar.policy.KeyguardUserSwitcher$Container"
        android:visibility="gone"
<!-- This is a view that shows a user switcher in Keyguard. -->
<com.android.systemui.statusbar.policy.KeyguardUserSwitcherView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/keyguard_user_switcher_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
        android:layout_width="match_parent">
    <!-- KeyguardUserSwitcher loads keyguard_user_switcher_inner.xml here -->
</view>
 No newline at end of file
    android:layout_gravity="end">

    <com.android.systemui.statusbar.policy.KeyguardUserSwitcherListView
        android:id="@+id/keyguard_user_switcher_list"
        android:orientation="vertical"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_gravity="top|end"
        android:gravity="end" />

    <LinearLayout
        android:id="@+id/end_guest_button"
        android:layout_height="@dimen/end_guest_button_layout_height"
        android:layout_width="wrap_content"
        android:layout_gravity="center_horizontal|bottom"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="@dimen/end_guest_button_margin_bottom"
        android:orientation="horizontal"
        android:gravity="center"
        android:paddingLeft="@dimen/end_guest_button_padding_horizontal"
        android:paddingRight="@dimen/end_guest_button_padding_horizontal"
        android:background="@drawable/end_guest_button_background"
        android:visibility="gone">
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:src="@drawable/ic_exit_to_app"
            android:background="@android:color/transparent"
            android:color="?attr/wallpaperTextColor" />
        <TextView
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:gravity="center"
            android:fontFamily="@*android:string/config_bodyFontFamilyMedium"
            android:textColor="?attr/wallpaperTextColor"
            android:textSize="13sp"
            android:text="@string/guest_exit_button" />
    </LinearLayout>

</com.android.systemui.statusbar.policy.KeyguardUserSwitcherView>
Loading