Let biometric prompt button text wrap to new line
Fixes an issue where the buttons on the biometric prompt would fail to wrap to a second line in order to accommodate long label text. This caused the buttons to be truncated in some languages (e.g. Russian). Test: On a Pixel 4 XL: 1. Ensure a lock pattern is set and Face Unlock is enabled 2. Set the system language to Russian (Russia) 3. Open wifi settings and select a saved network 4. Tap on the "Share" button for this network 5. Wait for Face Unlock to time out for the prompt 6. Rotate the device between portrait and landscape Fixes: 158240727 Change-Id: I51da6b124ffcd867322ee699e3908847e1df7ecd
This commit is contained in:
@@ -50,8 +50,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="24dp"
|
||||
android:paddingVertical="12dp"
|
||||
android:textSize="12sp"
|
||||
android:gravity="center_horizontal"
|
||||
android:accessibilityLiveRegion="polite"
|
||||
@@ -60,22 +59,23 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/button_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dip"
|
||||
android:paddingTop="24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_height="88dp"
|
||||
style="?android:attr/buttonBarStyle"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="16dp">
|
||||
<Space android:id="@+id/leftSpacer"
|
||||
android:layout_width="12dp"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible" />
|
||||
<!-- Negative Button -->
|
||||
<Button android:id="@+id/button_negative"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@*android:style/Widget.DeviceDefault.Button.Borderless.Colored"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"/>
|
||||
android:layout_gravity="center_vertical"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:maxWidth="@dimen/biometric_dialog_button_negative_max_width"/>
|
||||
<Space android:id="@+id/middleSpacer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
@@ -84,23 +84,27 @@
|
||||
<!-- Positive Button -->
|
||||
<Button android:id="@+id/button_positive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@*android:style/Widget.DeviceDefault.Button.Colored"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:maxWidth="@dimen/biometric_dialog_button_positive_max_width"
|
||||
android:text="@string/biometric_dialog_confirm"
|
||||
android:visibility="gone"/>
|
||||
<!-- Try Again Button -->
|
||||
<Button android:id="@+id/button_try_again"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@*android:style/Widget.DeviceDefault.Button.Colored"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:maxWidth="@dimen/biometric_dialog_button_positive_max_width"
|
||||
android:text="@string/biometric_dialog_try_again"
|
||||
android:visibility="gone"/>
|
||||
<Space android:id="@+id/rightSpacer"
|
||||
android:layout_width="12dip"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -41,4 +41,7 @@
|
||||
<dimen name="bubble_padding_top">4dp</dimen>
|
||||
|
||||
<dimen name="controls_activity_view_top_offset">25dp</dimen>
|
||||
|
||||
<dimen name="biometric_dialog_button_negative_max_width">140dp</dimen>
|
||||
<dimen name="biometric_dialog_button_positive_max_width">116dp</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -1116,6 +1116,8 @@
|
||||
|
||||
<!-- Biometric Dialog values -->
|
||||
<dimen name="biometric_dialog_biometric_icon_size">64dp</dimen>
|
||||
<dimen name="biometric_dialog_button_negative_max_width">160dp</dimen>
|
||||
<dimen name="biometric_dialog_button_positive_max_width">136dp</dimen>
|
||||
<dimen name="biometric_dialog_corner_size">4dp</dimen>
|
||||
<!-- Y translation when showing/dismissing the dialog-->
|
||||
<dimen name="biometric_dialog_animation_translation_offset">350dp</dimen>
|
||||
|
||||
Reference in New Issue
Block a user