From bbca300b30cea37cd9a0e3d8e509027823f8c160 Mon Sep 17 00:00:00 2001 From: lbill Date: Thu, 5 Jan 2023 05:24:57 +0000 Subject: [PATCH] 5/ Refine SetupChooseLockPattern layout by design Since the SetupChooseLockPattern include header icon header title, header sub-title, pattern state description, LockPatternView and FooterBar, there was a limited room for LockPatternView especially in the confirm steps which both header title and pattern description occupy 2 lines space. Hance the PatternView size used to inconsistence in-between 1st draw and 2nd confirm draw, besides it's visual looks jumping and small on some device which have smaller display. This solution includes 3 changes: 1. Organized the pattern view message to leverage header sub-title view, then we can resever more space. (Set minHeight=2 for sub-title) 2. Set screen_lock_options button visibilty to GONE when the stage in 2nd confirmation.(Previously it's INVISIBLE and reserve additional space) 3. Let LockPatternView align bottom of FrameLayout to prevent the view juming and flicker. 4. Clean up unused forAnyBiometric flag and code. 5. GlifLayout.getDescriptionTextView() == mHeaderView Need setDescriptionText() to make the view from GONE -> VISIBLE 6. Polish the stage flow and ensure IntroductionStage show correct message 7. Add ChooseLockPattern into embeded activity white list Force show ChooseLockPattern in fullscreen in case the Pattern view truncated in `NeedToConfirmStage` where the title showing 2 lines and push pattern view down, and get bad UX in the device which integrate a shorter display. 8. Add test cases for all stage and polish legacy test code. Test: make RunSettingsRoboTests ROBOTEST_FILTER= \ "com.android.settings.password.SetupChooseLockPatternTest" Test: make RunSettingsRoboTests ROBOTEST_FILTER= \ "com.android.settings.password.ChooseLockPatternTest" Bug: 249974175 Bug: 260027850 Change-Id: I868af9b14ba99af5d78a05f6c2a570ccc07aea15 --- .../choose_lock_pattern_common.xml | 34 ++-- res/layout/choose_lock_pattern_common.xml | 22 +-- res/values-land/dimens.xml | 0 res/values-land/styles.xml | 1 + res/values/styles.xml | 6 + .../ActivityEmbeddingRulesController.java | 2 + .../settings/password/ChooseLockPattern.java | 55 +++--- .../password/SetupChooseLockPattern.java | 24 ++- .../password/SetupChooseLockPatternTest.java | 173 ++++++++++++++++-- 9 files changed, 230 insertions(+), 87 deletions(-) mode change 100755 => 100644 res/values-land/dimens.xml diff --git a/res/layout-land/choose_lock_pattern_common.xml b/res/layout-land/choose_lock_pattern_common.xml index 16734137906..cb51703a310 100644 --- a/res/layout-land/choose_lock_pattern_common.xml +++ b/res/layout-land/choose_lock_pattern_common.xml @@ -33,30 +33,29 @@ android:clipChildren="false" android:clipToPadding="false" android:orientation="vertical" + android:paddingTop="0dp" android:paddingLeft="0dp" - android:paddingRight="0dp"> + android:paddingRight="0dp" + android:paddingBottom="0dp"> - +