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

Commit 8ddb2da8 authored by Adrian Roos's avatar Adrian Roos
Browse files

Implement keyguard user switcher

Bug: 15545213
Change-Id: I2d18cc3c83d76991fe11fc4bff7e8eecc25df4b5
parent 6b605045
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -22,7 +22,13 @@ Copyright (C) 2014 The Android Open Source Project
        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="#FFFFFFFF"
        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>
+25 −0
Original line number Diff line number Diff line
<?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
  -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/keyguard_user_switcher"
        android:orientation="vertical"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:gravity="end"
        android:visibility="gone"
        android:paddingTop="4dp">
</LinearLayout>
+40 −0
Original line number Diff line number Diff line
<?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
  -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:sysui="http://schemas.android.com/apk/res-auto"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="8dp"
        android:layout_marginEnd="8dp"
        android:gravity="center_vertical"
        android:clickable="true"
        android:background="@drawable/ripple_drawable">
    <TextView android:id="@+id/name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="16dp"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.UserSwitcher.UserName"
            />
    <com.android.systemui.statusbar.phone.UserAvatarView android:id="@+id/picture"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:contentDescription="@null"
            sysui:frameWidth="@dimen/keyguard_user_switcher_border_thickness"
            sysui:activeFrameColor="@color/current_user_border_color" />
</LinearLayout>
 No newline at end of file
+9 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
    android:id="@+id/notification_panel"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/transparent"
    >

    <include
@@ -91,6 +92,14 @@

    <include layout="@layout/status_bar_expanded_header" />

    <ViewStub
        android:id="@+id/keyguard_user_switcher"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_marginTop="@dimen/status_bar_header_height_keyguard"
        android:layout_gravity="end"
        android:layout="@layout/keyguard_user_switcher" />

    <include
        layout="@layout/keyguard_bottom_area"
        android:visibility="gone" />
+2 −2
Original line number Diff line number Diff line
@@ -73,9 +73,9 @@
        android:layout_width="wrap_content"
        android:layout_height="@dimen/status_bar_header_height"
        android:layout_toStartOf="@id/multi_user_switch"
        android:layout_marginEnd="2dp"
        android:layout_alignWithParentIfMissing="true"
        android:layout_marginStart="16dp"
        />
        android:paddingEnd="2dp" />

    <TextView
        android:id="@+id/header_charging_info"
Loading