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

Commit ba88b3e7 authored by Bryan Eyler's avatar Bryan Eyler
Browse files

Add expand icon for user switcher.

Adds the arrow to the left of the user name.
Animates the arrow in a sweet 180 degree rotation.

Bug: 65423882
Change-Id: I13a40dbd65c1335fdb579223d7c7cbd8623b3d6b
(cherry picked from commit f4d69c2b575940eca4620db5aec6d42b98b53071)
parent ab28b99d
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
<!-- Copyright (C) 2017 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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">

    <objectAnimator
        android:duration="167"
        android:propertyName="rotation"
        android:valueType="floatType"
        android:valueFrom="180"
        android:valueTo="0"
        android:interpolator="@android:interpolator/fast_out_slow_in" />
</set>
 No newline at end of file
+24 −0
Original line number Diff line number Diff line
<!-- Copyright (C) 2017 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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">

    <objectAnimator
        android:duration="167"
        android:propertyName="rotation"
        android:valueType="floatType"
        android:valueFrom="0"
        android:valueTo="180"
        android:interpolator="@android:interpolator/fast_out_slow_in" />
</set>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2015 The Android Open Source Project
  ~ Copyright (C) 2017 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.
+24 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2015 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="48.0dp"
        android:height="48.0dp"
        android:viewportWidth="48.0"
        android:viewportHeight="48.0">
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M14 28l10-10 10 10z"/>
</vector>
+13 −2
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@
        android:layout_centerVertical="true"
        android:layout_width="@dimen/car_qs_footer_icon_width"
        android:layout_height="@dimen/car_qs_footer_icon_height"
        android:layout_marginRight="@dimen/car_qs_footer_user_switch_margin_right"
        android:background="@drawable/ripple_drawable"
        android:focusable="true">

@@ -47,6 +46,18 @@
            android:scaleType="fitCenter"/>
    </com.android.systemui.statusbar.phone.MultiUserSwitch>

    <ImageView
        android:id="@+id/user_switch_expand_icon"
        android:layout_height="match_parent"
        android:layout_width="@dimen/car_qs_footer_user_switch_icon_width"
        android:layout_centerVertical="true"
        android:layout_toEndOf="@+id/multi_user_switch"
        android:layout_marginLeft="@dimen/car_qs_footer_user_switch_icon_margin"
        android:layout_marginRight="@dimen/car_qs_footer_user_switch_icon_margin"
        android:src="@drawable/car_ic_arrow_drop_up"
        android:scaleType="fitCenter">
    </ImageView>

    <TextView android:id="@+id/user_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
@@ -54,7 +65,7 @@
        android:textColor="@color/car_qs_footer_user_name_color"
        android:gravity="start|center_vertical"
        android:layout_centerVertical="true"
        android:layout_toEndOf="@id/multi_user_switch" />
        android:layout_toEndOf="@id/user_switch_expand_icon" />

    <com.android.systemui.statusbar.phone.SettingsButton
        android:id="@+id/settings_button"
Loading