From 4853cce9712e0d5c52fb3095920ba1bfd7ef1926 Mon Sep 17 00:00:00 2001 From: Maurice Lam Date: Mon, 15 May 2017 12:20:17 -0700 Subject: [PATCH] Make lock pattern more usable on small screens - Remove the icon on screens smaller than sw400dp - Make sure all margins and spacing are removed before shrinking content - Shrink the pattern view to avoid cutting off the text at the top Test: Manual Bug: 38269249 Change-Id: I5d7bf956929f52952a588962febf3dcf43286b76 --- res/layout/choose_lock_pattern_common.xml | 24 ++++- .../confirm_lock_pattern_internal_base.xml | 102 ++++++++---------- res/values-sw400dp/styles.xml | 23 ++++ res/values/styles.xml | 5 + 4 files changed, 93 insertions(+), 61 deletions(-) create mode 100755 res/values-sw400dp/styles.xml diff --git a/res/layout/choose_lock_pattern_common.xml b/res/layout/choose_lock_pattern_common.xml index a54987dcaaa..84103ae0d56 100644 --- a/res/layout/choose_lock_pattern_common.xml +++ b/res/layout/choose_lock_pattern_common.xml @@ -22,6 +22,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:icon="@drawable/ic_lock" + android:layout="@layout/suw_glif_blank_template" settings:suwFooter="@layout/choose_lock_pattern_common_footer" settings:suwHeaderText="@string/lockpassword_choose_your_pattern_header"> @@ -34,6 +35,26 @@ android:clipToPadding="false" android:orientation="vertical"> + + + + + + + + @@ -55,7 +75,7 @@ + android:layout_weight="1" /> diff --git a/res/layout/confirm_lock_pattern_internal_base.xml b/res/layout/confirm_lock_pattern_internal_base.xml index e20d04d3922..cd5739e10a0 100644 --- a/res/layout/confirm_lock_pattern_internal_base.xml +++ b/res/layout/confirm_lock_pattern_internal_base.xml @@ -27,77 +27,61 @@ android:layout_height="match_parent" android:orientation="vertical"> - + android:layout_height="wrap_content" + android:orientation="vertical"> - + + + android:layout_height="wrap_content" /> - + - - - - - - - + - - + android:layout_weight="4" + android:layout_gravity="center_horizontal"/> - + - - +