Fix sizing of pattern view
Align the size of pattern view in ChooseLockPattern, ConfirmLockPattern, and keyguard as much as possible. In rare cases they may still be inconsistent because the screens have different content outside of the pattern view (e.g. header text, navigation buttons etc) Test: Manual Bug: 64339681 Change-Id: Ie07ae211340967a3cdf9c6c28f9818f207dbd2c9
This commit is contained in:
@@ -138,10 +138,12 @@
|
||||
</LinearLayout>
|
||||
|
||||
<!-- right side: lock pattern -->
|
||||
<FrameLayout
|
||||
<com.android.setupwizardlib.view.FillContentLayout
|
||||
style="@style/LockPatternContainerStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.0">
|
||||
android:layout_weight="1.0"
|
||||
android:paddingStart="0dp">
|
||||
|
||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||
android:layout_width="match_parent"
|
||||
@@ -149,7 +151,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/lock_pattern_background" />
|
||||
|
||||
</FrameLayout>
|
||||
</com.android.setupwizardlib.view.FillContentLayout>
|
||||
|
||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||
|
||||
|
||||
@@ -96,10 +96,12 @@
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<FrameLayout
|
||||
<com.android.setupwizardlib.view.FillContentLayout
|
||||
style="@style/LockPatternContainerStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="0dp">
|
||||
|
||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||
android:layout_width="match_parent"
|
||||
@@ -107,7 +109,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/lock_pattern_background" />
|
||||
|
||||
</FrameLayout>
|
||||
</com.android.setupwizardlib.view.FillContentLayout>
|
||||
|
||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||
</com.android.setupwizardlib.GlifLayout>
|
||||
|
||||
@@ -64,19 +64,31 @@
|
||||
android:gravity="center"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp">
|
||||
|
||||
<TextView android:id="@+id/headerText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minLines="2"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="?attr/suwMarginSides"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1" />
|
||||
<com.android.setupwizardlib.view.FillContentLayout
|
||||
style="@style/LockPatternContainerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.android.internal.widget.LockPatternView
|
||||
android:id="@+id/lockPattern"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</com.android.setupwizardlib.view.FillContentLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -61,14 +61,23 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
android:gravity="center"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp">
|
||||
|
||||
<com.android.internal.widget.LockPatternView
|
||||
android:id="@+id/lockPattern"
|
||||
android:layout_width="match_parent"
|
||||
<com.android.setupwizardlib.view.FillContentLayout
|
||||
style="@style/LockPatternContainerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="4"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.android.internal.widget.LockPatternView
|
||||
android:id="@+id/lockPattern"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</com.android.setupwizardlib.view.FillContentLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.ConfirmDeviceCredentialsErrorText"
|
||||
@@ -77,9 +86,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginHorizontal="?attr/suwMarginSides"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
<ImageView
|
||||
@@ -87,6 +95,7 @@
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="?attr/suwMarginSides"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:contentDescription="@string/confirm_fingerprint_icon_content_description"
|
||||
android:visibility="gone"/>
|
||||
|
||||
@@ -425,6 +425,16 @@
|
||||
|
||||
<style name="DreamStartButton" parent="android:Widget.Material.Button" />
|
||||
|
||||
<style name="LockPatternContainerStyle">
|
||||
<item name="android:maxHeight">400dp</item>
|
||||
<item name="android:maxWidth">420dp</item>
|
||||
<item name="android:minHeight">0dp</item>
|
||||
<item name="android:minWidth">0dp</item>
|
||||
<item name="android:paddingBottom">0dp</item>
|
||||
<item name="android:paddingHorizontal">44dp</item>
|
||||
<item name="android:paddingTop">0dp</item>
|
||||
</style>
|
||||
|
||||
<style name="LockPatternStyle">
|
||||
<item name="*android:regularColor">@color/lock_pattern_view_regular_color</item>
|
||||
<item name="*android:successColor">@color/lock_pattern_view_success_color</item>
|
||||
|
||||
Reference in New Issue
Block a user