From 715bdbcd424af1adc3f27b613951bb97970825bd Mon Sep 17 00:00:00 2001 From: Bryan Eyler Date: Tue, 10 Oct 2017 11:56:21 -0700 Subject: [PATCH] Add pagination dots and fix animation of user switcher. - Adds pagination dots to user switcher dropdown. - Adds device name text view for when devices are associated with users. - Fixes the layout of the user grid to handle changing height for proper animation. Bug: 65423882 Tested on Mojave with longer animation times to ensure correctness. Change-Id: I54ae5cc93f9caa9d6c4a5c2c7e9e2488a6257001 (cherry picked from commit 0de35b5386ad7e00f13a7611fce36ca990b201e0) --- .../car_user_switcher_close_animation.xml | 20 ++++ .../anim/car_user_switcher_open_animation.xml | 20 ++++ .../res/layout/car_fullscreen_user_pod.xml | 29 ++++-- .../car_fullscreen_user_pod_container.xml | 3 +- .../layout/car_fullscreen_user_switcher.xml | 2 +- packages/SystemUI/res/layout/car_qs_panel.xml | 29 +++++- packages/SystemUI/res/values/dimens_car.xml | 12 ++- .../android/systemui/qs/car/CarQSFooter.java | 14 +-- .../systemui/qs/car/CarQSFragment.java | 67 ++++++++++++- .../statusbar/car/FullscreenUserSwitcher.java | 2 +- .../systemui/statusbar/car/UserGridView.java | 93 +------------------ 11 files changed, 169 insertions(+), 122 deletions(-) create mode 100644 packages/SystemUI/res/anim/car_user_switcher_close_animation.xml create mode 100644 packages/SystemUI/res/anim/car_user_switcher_open_animation.xml diff --git a/packages/SystemUI/res/anim/car_user_switcher_close_animation.xml b/packages/SystemUI/res/anim/car_user_switcher_close_animation.xml new file mode 100644 index 0000000000000..da92e85af83b4 --- /dev/null +++ b/packages/SystemUI/res/anim/car_user_switcher_close_animation.xml @@ -0,0 +1,20 @@ + + diff --git a/packages/SystemUI/res/anim/car_user_switcher_open_animation.xml b/packages/SystemUI/res/anim/car_user_switcher_open_animation.xml new file mode 100644 index 0000000000000..8b0e4a5e8c1d9 --- /dev/null +++ b/packages/SystemUI/res/anim/car_user_switcher_open_animation.xml @@ -0,0 +1,20 @@ + + diff --git a/packages/SystemUI/res/layout/car_fullscreen_user_pod.xml b/packages/SystemUI/res/layout/car_fullscreen_user_pod.xml index 2f16516a6fea6..bc5d37c1c2ad3 100644 --- a/packages/SystemUI/res/layout/car_fullscreen_user_pod.xml +++ b/packages/SystemUI/res/layout/car_fullscreen_user_pod.xml @@ -15,27 +15,38 @@ limitations under the License. --> - + android:layout_height="@dimen/car_fullscreen_user_pod_height" + android:layout_gravity="center_horizontal|bottom" > + android:layout_height="@dimen/car_fullscreen_user_pod_image_avatar_height" + android:layout_above="@id/user_name" /> - + android:layout_above="@id/device_name" /> + + + diff --git a/packages/SystemUI/res/layout/car_fullscreen_user_pod_container.xml b/packages/SystemUI/res/layout/car_fullscreen_user_pod_container.xml index 99d010f2ac2b6..2f6ad2c4d6018 100644 --- a/packages/SystemUI/res/layout/car_fullscreen_user_pod_container.xml +++ b/packages/SystemUI/res/layout/car_fullscreen_user_pod_container.xml @@ -18,8 +18,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="center" - android:layout_gravity="center" > + android:gravity="center" > diff --git a/packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml b/packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml index 257e2814bb659..478b65642689d 100644 --- a/packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml +++ b/packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml @@ -54,13 +54,13 @@ android:layout_height="wrap_content" android:layout_marginLeft="@dimen/car_margin" android:layout_marginRight="@dimen/car_margin" + android:layout_marginBottom="@dimen/car_user_grid_margin_bottom" android:layout_centerInParent="true" />