Merge "Make sim pin views more responsive" into tm-qpr-dev
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -14,10 +14,12 @@
|
|||||||
~ limitations under the License
|
~ limitations under the License
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/digit_text"
|
android:id="@+id/digit_text"
|
||||||
style="@style/Widget.TextView.NumPadKey.Digit"
|
style="@style/Widget.TextView.NumPadKey.Digit"
|
||||||
|
android:autoSizeMaxTextSize="32sp"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
<!--
|
|
||||||
**
|
**
|
||||||
** Copyright 2012, The Android Open Source Project
|
** Copyright 2012, The Android Open Source Project
|
||||||
**
|
**
|
||||||
@@ -17,185 +16,185 @@
|
|||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
<!-- This is the SIM PIN view that allows the user to enter a SIM PIN to unlock the device. -->
|
<!-- This is the SIM PIN view that allows the user to enter a SIM PIN to unlock the device. -->
|
||||||
<com.android.keyguard.KeyguardSimPinView
|
<com.android.keyguard.KeyguardSimPinView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:androidprv="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:androidprv="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/keyguard_sim_pin_view"
|
android:id="@+id/keyguard_sim_pin_view"
|
||||||
android:orientation="vertical"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
androidprv:layout_maxWidth="@dimen/keyguard_security_width"
|
||||||
|
android:layout_gravity="center_horizontal|bottom">
|
||||||
|
<include layout="@layout/keyguard_bouncer_message_area"/>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="0dp"
|
||||||
androidprv:layout_maxWidth="@dimen/keyguard_security_width"
|
android:layout_weight="1"
|
||||||
android:layout_gravity="center_horizontal|bottom">
|
android:layoutDirection="ltr">
|
||||||
<include layout="@layout/keyguard_bouncer_message_area" />
|
<LinearLayout
|
||||||
<Space
|
android:id="@+id/pin_area"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/keyguard_sim"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:tint="@color/background_protected"
|
|
||||||
android:src="@drawable/ic_lockscreen_sim"/>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:gravity="center"
|
android:gravity="center_horizontal"
|
||||||
android:layoutDirection="ltr"
|
android:paddingTop="@dimen/num_pad_entry_row_margin_bottom"
|
||||||
>
|
android:paddingBottom="@dimen/num_pad_entry_row_margin_bottom"
|
||||||
<include layout="@layout/keyguard_esim_area"
|
androidprv:layout_constraintBottom_toTopOf="@+id/flow1"
|
||||||
android:id="@+id/keyguard_esim_area"
|
androidprv:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_width="wrap_content"
|
androidprv:layout_constraintStart_toStartOf="parent"
|
||||||
android:layout_height="wrap_content" />
|
androidprv:layout_constraintTop_toTopOf="parent">
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/row0"
|
<ImageView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/keyguard_sim"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="40dp"
|
||||||
android:paddingBottom="4dp"
|
android:layout_height="40dp"
|
||||||
>
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:src="@drawable/ic_lockscreen_sim"
|
||||||
|
app:tint="@color/background_protected" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/keyguard_esim_area"
|
||||||
|
layout="@layout/keyguard_esim_area"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<com.android.keyguard.PasswordTextView
|
<com.android.keyguard.PasswordTextView
|
||||||
android:id="@+id/simPinEntry"
|
android:id="@+id/simPinEntry"
|
||||||
style="@style/Widget.TextView.Password"
|
style="@style/Widget.TextView.Password"
|
||||||
android:layout_width="@dimen/keyguard_security_width"
|
android:layout_width="@dimen/keyguard_security_width"
|
||||||
android:layout_height="@dimen/keyguard_password_height"
|
android:layout_height="@dimen/keyguard_password_height"
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_marginRight="72dp"
|
|
||||||
android:contentDescription="@string/keyguard_accessibility_sim_pin_area"
|
android:contentDescription="@string/keyguard_accessibility_sim_pin_area"
|
||||||
android:gravity="center"
|
android:layout_gravity="center_horizontal"
|
||||||
androidprv:scaledTextSize="@integer/scaled_password_text_size" />
|
androidprv:scaledTextSize="@integer/scaled_password_text_size" />
|
||||||
</RelativeLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
|
|
||||||
>
|
|
||||||
<com.android.keyguard.NumPadKey
|
|
||||||
android:id="@+id/key1"
|
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
|
||||||
androidprv:textView="@+id/simPinEntry"
|
|
||||||
androidprv:digit="1"
|
|
||||||
/>
|
|
||||||
<com.android.keyguard.NumPadKey
|
|
||||||
android:id="@+id/key2"
|
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
|
||||||
androidprv:textView="@+id/simPinEntry"
|
|
||||||
androidprv:digit="2"
|
|
||||||
/>
|
|
||||||
<com.android.keyguard.NumPadKey
|
|
||||||
android:id="@+id/key3"
|
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
androidprv:textView="@+id/simPinEntry"
|
|
||||||
androidprv:digit="3"
|
|
||||||
/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
<androidx.constraintlayout.helper.widget.Flow
|
||||||
android:layout_height="wrap_content"
|
android:id="@+id/flow1"
|
||||||
android:orientation="horizontal"
|
android:layout_width="0dp"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_height="0dp"
|
||||||
android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
|
android:clipChildren="false"
|
||||||
>
|
android:clipToPadding="false"
|
||||||
<com.android.keyguard.NumPadKey
|
android:orientation="horizontal"
|
||||||
android:id="@+id/key4"
|
androidprv:constraint_referenced_ids="key1,key2,key3,key4,key5,key6,key7,key8,key9,delete_button,key0,key_enter"
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
androidprv:flow_horizontalGap="@dimen/num_pad_key_margin_end"
|
||||||
android:layout_height="match_parent"
|
androidprv:flow_horizontalStyle="packed"
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
androidprv:flow_maxElementsWrap="3"
|
||||||
androidprv:textView="@+id/simPinEntry"
|
androidprv:flow_verticalBias="1.0"
|
||||||
androidprv:digit="4"
|
androidprv:flow_verticalGap="@dimen/num_pad_entry_row_margin_bottom"
|
||||||
/>
|
androidprv:flow_verticalStyle="packed"
|
||||||
<com.android.keyguard.NumPadKey
|
androidprv:flow_wrapMode="aligned"
|
||||||
android:id="@+id/key5"
|
androidprv:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
androidprv:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_height="match_parent"
|
androidprv:layout_constraintStart_toStartOf="parent"
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
androidprv:layout_constraintTop_toBottomOf="@id/pin_area" />
|
||||||
androidprv:textView="@+id/simPinEntry"
|
|
||||||
androidprv:digit="5"
|
<com.android.keyguard.NumPadButton
|
||||||
/>
|
android:id="@+id/delete_button"
|
||||||
<com.android.keyguard.NumPadKey
|
style="@style/NumPadKey.Delete"
|
||||||
android:id="@+id/key6"
|
android:layout_width="0dp"
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
android:layout_height="0dp"
|
||||||
android:layout_height="match_parent"
|
android:accessibilityTraversalBefore="@id/key0"
|
||||||
androidprv:textView="@+id/simPinEntry"
|
android:contentDescription="@string/keyboardview_keycode_delete" />
|
||||||
androidprv:digit="6"
|
|
||||||
/>
|
<com.android.keyguard.NumPadButton
|
||||||
</LinearLayout>
|
android:id="@+id/key_enter"
|
||||||
<LinearLayout
|
style="@style/NumPadKey.Enter"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:orientation="horizontal"
|
android:contentDescription="@string/keyboardview_keycode_enter" />
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
|
<com.android.keyguard.NumPadKey
|
||||||
>
|
android:id="@+id/key1"
|
||||||
<com.android.keyguard.NumPadKey
|
android:layout_width="0dp"
|
||||||
android:id="@+id/key7"
|
android:layout_height="0dp"
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
android:accessibilityTraversalBefore="@id/key2"
|
||||||
android:layout_height="match_parent"
|
androidprv:digit="1"
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
androidprv:textView="@+id/simPinEntry" />
|
||||||
androidprv:textView="@+id/simPinEntry"
|
|
||||||
androidprv:digit="7"
|
<com.android.keyguard.NumPadKey
|
||||||
/>
|
android:id="@+id/key2"
|
||||||
<com.android.keyguard.NumPadKey
|
android:layout_width="0dp"
|
||||||
android:id="@+id/key8"
|
android:layout_height="0dp"
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
android:accessibilityTraversalBefore="@id/key3"
|
||||||
android:layout_height="match_parent"
|
androidprv:digit="2"
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
androidprv:textView="@+id/simPinEntry" />
|
||||||
androidprv:textView="@+id/simPinEntry"
|
|
||||||
androidprv:digit="8"
|
<com.android.keyguard.NumPadKey
|
||||||
/>
|
android:id="@+id/key3"
|
||||||
<com.android.keyguard.NumPadKey
|
android:layout_width="0dp"
|
||||||
android:id="@+id/key9"
|
android:layout_height="0dp"
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
android:accessibilityTraversalBefore="@id/key4"
|
||||||
android:layout_height="match_parent"
|
androidprv:digit="3"
|
||||||
androidprv:textView="@+id/simPinEntry"
|
androidprv:textView="@+id/simPinEntry" />
|
||||||
androidprv:digit="9"
|
|
||||||
/>
|
<com.android.keyguard.NumPadKey
|
||||||
</LinearLayout>
|
android:id="@+id/key4"
|
||||||
<LinearLayout
|
android:layout_width="0dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:accessibilityTraversalBefore="@id/key5"
|
||||||
android:orientation="horizontal"
|
androidprv:digit="4"
|
||||||
android:layout_gravity="center_horizontal"
|
androidprv:textView="@+id/simPinEntry" />
|
||||||
>
|
|
||||||
<com.android.keyguard.NumPadButton
|
<com.android.keyguard.NumPadKey
|
||||||
android:id="@+id/delete_button"
|
android:id="@+id/key5"
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="0dp"
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
android:accessibilityTraversalBefore="@id/key6"
|
||||||
android:contentDescription="@string/keyboardview_keycode_delete"
|
androidprv:digit="5"
|
||||||
style="@style/NumPadKey.Delete"
|
androidprv:textView="@+id/simPinEntry" />
|
||||||
/>
|
|
||||||
<com.android.keyguard.NumPadKey
|
|
||||||
android:id="@+id/key0"
|
<com.android.keyguard.NumPadKey
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
android:id="@+id/key6"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
android:layout_height="0dp"
|
||||||
androidprv:textView="@+id/simPinEntry"
|
android:accessibilityTraversalBefore="@id/key7"
|
||||||
androidprv:digit="0"
|
androidprv:digit="6"
|
||||||
/>
|
androidprv:textView="@+id/simPinEntry" />
|
||||||
<com.android.keyguard.NumPadButton
|
|
||||||
android:id="@+id/key_enter"
|
<com.android.keyguard.NumPadKey
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
android:id="@+id/key7"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="0dp"
|
||||||
style="@style/NumPadKey.Enter"
|
android:layout_height="0dp"
|
||||||
android:contentDescription="@string/keyboardview_keycode_enter"
|
android:accessibilityTraversalBefore="@id/key8"
|
||||||
/>
|
androidprv:digit="7"
|
||||||
</LinearLayout>
|
androidprv:textView="@+id/simPinEntry" />
|
||||||
</LinearLayout>
|
|
||||||
<include layout="@layout/keyguard_eca"
|
<com.android.keyguard.NumPadKey
|
||||||
android:id="@+id/keyguard_selector_fade_container"
|
android:id="@+id/key8"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:orientation="vertical"
|
android:accessibilityTraversalBefore="@id/key9"
|
||||||
android:layout_gravity="bottom|center_horizontal"
|
androidprv:digit="8"
|
||||||
android:layout_marginTop="@dimen/keyguard_eca_top_margin"
|
androidprv:textView="@+id/simPinEntry" />
|
||||||
android:layout_marginBottom="2dp"
|
|
||||||
android:gravity="center_horizontal"/>
|
<com.android.keyguard.NumPadKey
|
||||||
|
android:id="@+id/key9"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:accessibilityTraversalBefore="@id/delete_button"
|
||||||
|
androidprv:digit="9"
|
||||||
|
androidprv:textView="@+id/simPinEntry" />
|
||||||
|
|
||||||
|
<com.android.keyguard.NumPadKey
|
||||||
|
android:id="@+id/key0"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:accessibilityTraversalBefore="@id/key_enter"
|
||||||
|
androidprv:digit="0"
|
||||||
|
androidprv:textView="@+id/simPinEntry" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/keyguard_selector_fade_container"
|
||||||
|
layout="@layout/keyguard_eca"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom|center_horizontal"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
android:layout_marginTop="@dimen/keyguard_eca_top_margin"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical" />
|
||||||
</com.android.keyguard.KeyguardSimPinView>
|
</com.android.keyguard.KeyguardSimPinView>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
<com.android.keyguard.KeyguardSimPukView
|
<com.android.keyguard.KeyguardSimPukView
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:androidprv="http://schemas.android.com/apk/res-auto"
|
xmlns:androidprv="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/keyguard_sim_puk_view"
|
android:id="@+id/keyguard_sim_puk_view"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -29,173 +30,165 @@
|
|||||||
android:layout_gravity="center_horizontal|bottom">
|
android:layout_gravity="center_horizontal|bottom">
|
||||||
<include layout="@layout/keyguard_bouncer_message_area"/>
|
<include layout="@layout/keyguard_bouncer_message_area"/>
|
||||||
|
|
||||||
<Space
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1"
|
||||||
|
android:layoutDirection="ltr">
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:id="@+id/keyguard_sim"
|
android:id="@+id/pin_area"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:tint="@color/background_protected"
|
|
||||||
android:src="@drawable/ic_lockscreen_sim"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:gravity="center"
|
android:gravity="center_horizontal"
|
||||||
android:layoutDirection="ltr"
|
android:paddingTop="@dimen/num_pad_entry_row_margin_bottom"
|
||||||
>
|
android:paddingBottom="@dimen/num_pad_entry_row_margin_bottom"
|
||||||
<include layout="@layout/keyguard_esim_area"
|
androidprv:layout_constraintBottom_toTopOf="@+id/flow1"
|
||||||
android:id="@+id/keyguard_esim_area"
|
androidprv:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_width="wrap_content"
|
androidprv:layout_constraintStart_toStartOf="parent"
|
||||||
android:layout_height="wrap_content" />
|
androidprv:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<RelativeLayout
|
<ImageView
|
||||||
android:id="@+id/row0"
|
android:id="@+id/keyguard_sim"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="40dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="40dp"
|
||||||
android:paddingBottom="4dp"
|
android:layout_gravity="center_horizontal"
|
||||||
>
|
android:src="@drawable/ic_lockscreen_sim"
|
||||||
|
app:tint="@color/background_protected" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/keyguard_esim_area"
|
||||||
|
layout="@layout/keyguard_esim_area"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<com.android.keyguard.PasswordTextView
|
<com.android.keyguard.PasswordTextView
|
||||||
android:id="@+id/pukEntry"
|
android:id="@+id/pukEntry"
|
||||||
style="@style/Widget.TextView.Password"
|
style="@style/Widget.TextView.Password"
|
||||||
android:layout_width="@dimen/keyguard_security_width"
|
android:layout_width="@dimen/keyguard_security_width"
|
||||||
android:layout_height="@dimen/keyguard_password_height"
|
android:layout_height="@dimen/keyguard_password_height"
|
||||||
android:layout_centerHorizontal="true"
|
android:contentDescription="@string/keyguard_accessibility_sim_pin_area"
|
||||||
android:layout_marginRight="72dp"
|
android:layout_gravity="center_horizontal"
|
||||||
android:contentDescription="@string/keyguard_accessibility_sim_puk_area"
|
|
||||||
android:gravity="center"
|
|
||||||
androidprv:scaledTextSize="@integer/scaled_password_text_size" />
|
androidprv:scaledTextSize="@integer/scaled_password_text_size" />
|
||||||
</RelativeLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
|
|
||||||
>
|
|
||||||
<com.android.keyguard.NumPadKey
|
|
||||||
android:id="@+id/key1"
|
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
|
||||||
androidprv:textView="@+id/pukEntry"
|
|
||||||
androidprv:digit="1"
|
|
||||||
/>
|
|
||||||
<com.android.keyguard.NumPadKey
|
|
||||||
android:id="@+id/key2"
|
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
|
||||||
androidprv:textView="@+id/pukEntry"
|
|
||||||
androidprv:digit="2"
|
|
||||||
/>
|
|
||||||
<com.android.keyguard.NumPadKey
|
|
||||||
android:id="@+id/key3"
|
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
androidprv:textView="@+id/pukEntry"
|
|
||||||
androidprv:digit="3"
|
|
||||||
/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
|
|
||||||
|
|
||||||
>
|
<androidx.constraintlayout.helper.widget.Flow
|
||||||
<com.android.keyguard.NumPadKey
|
android:id="@+id/flow1"
|
||||||
android:id="@+id/key4"
|
android:layout_width="0dp"
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
android:layout_height="0dp"
|
||||||
android:layout_height="match_parent"
|
android:clipChildren="false"
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
android:clipToPadding="false"
|
||||||
androidprv:textView="@+id/pukEntry"
|
android:orientation="horizontal"
|
||||||
androidprv:digit="4"
|
androidprv:constraint_referenced_ids="key1,key2,key3,key4,key5,key6,key7,key8,key9,delete_button,key0,key_enter"
|
||||||
/>
|
androidprv:flow_horizontalGap="@dimen/num_pad_key_margin_end"
|
||||||
<com.android.keyguard.NumPadKey
|
androidprv:flow_horizontalStyle="packed"
|
||||||
android:id="@+id/key5"
|
androidprv:flow_maxElementsWrap="3"
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
androidprv:flow_verticalBias="1.0"
|
||||||
android:layout_height="match_parent"
|
androidprv:flow_verticalGap="@dimen/num_pad_entry_row_margin_bottom"
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
androidprv:flow_verticalStyle="packed"
|
||||||
androidprv:textView="@+id/pukEntry"
|
androidprv:flow_wrapMode="aligned"
|
||||||
androidprv:digit="5"
|
androidprv:layout_constraintBottom_toBottomOf="parent"
|
||||||
/>
|
androidprv:layout_constraintEnd_toEndOf="parent"
|
||||||
<com.android.keyguard.NumPadKey
|
androidprv:layout_constraintStart_toStartOf="parent"
|
||||||
android:id="@+id/key6"
|
androidprv:layout_constraintTop_toBottomOf="@id/pin_area" />
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
|
||||||
android:layout_height="match_parent"
|
<com.android.keyguard.NumPadButton
|
||||||
androidprv:textView="@+id/pukEntry"
|
android:id="@+id/delete_button"
|
||||||
androidprv:digit="6"
|
style="@style/NumPadKey.Delete"
|
||||||
/>
|
android:layout_width="0dp"
|
||||||
</LinearLayout>
|
android:layout_height="0dp"
|
||||||
<LinearLayout
|
android:accessibilityTraversalBefore="@id/key0"
|
||||||
android:layout_width="wrap_content"
|
android:contentDescription="@string/keyboardview_keycode_delete" />
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
<com.android.keyguard.NumPadButton
|
||||||
android:layout_gravity="center_horizontal"
|
android:id="@+id/key_enter"
|
||||||
android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
|
style="@style/NumPadKey.Enter"
|
||||||
>
|
android:layout_width="0dp"
|
||||||
<com.android.keyguard.NumPadKey
|
android:layout_height="0dp"
|
||||||
android:id="@+id/key7"
|
android:contentDescription="@string/keyboardview_keycode_enter" />
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
|
||||||
android:layout_height="match_parent"
|
<com.android.keyguard.NumPadKey
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
android:id="@+id/key1"
|
||||||
androidprv:textView="@+id/pukEntry"
|
android:layout_width="0dp"
|
||||||
androidprv:digit="7"
|
android:layout_height="0dp"
|
||||||
/>
|
android:accessibilityTraversalBefore="@id/key2"
|
||||||
<com.android.keyguard.NumPadKey
|
androidprv:digit="1"
|
||||||
android:id="@+id/key8"
|
androidprv:textView="@+id/pukEntry" />
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
|
||||||
android:layout_height="match_parent"
|
<com.android.keyguard.NumPadKey
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
android:id="@+id/key2"
|
||||||
androidprv:textView="@+id/pukEntry"
|
android:layout_width="0dp"
|
||||||
androidprv:digit="8"
|
android:layout_height="0dp"
|
||||||
/>
|
android:accessibilityTraversalBefore="@id/key3"
|
||||||
<com.android.keyguard.NumPadKey
|
androidprv:digit="2"
|
||||||
android:id="@+id/key9"
|
androidprv:textView="@+id/pukEntry" />
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
|
||||||
android:layout_height="match_parent"
|
<com.android.keyguard.NumPadKey
|
||||||
androidprv:textView="@+id/pukEntry"
|
android:id="@+id/key3"
|
||||||
androidprv:digit="9"
|
android:layout_width="0dp"
|
||||||
/>
|
android:layout_height="0dp"
|
||||||
</LinearLayout>
|
android:accessibilityTraversalBefore="@id/key4"
|
||||||
<LinearLayout
|
androidprv:digit="3"
|
||||||
android:layout_width="wrap_content"
|
androidprv:textView="@+id/pukEntry" />
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
<com.android.keyguard.NumPadKey
|
||||||
android:layout_gravity="center_horizontal"
|
android:id="@+id/key4"
|
||||||
>
|
android:layout_width="0dp"
|
||||||
<com.android.keyguard.NumPadButton
|
android:layout_height="0dp"
|
||||||
android:id="@+id/delete_button"
|
android:accessibilityTraversalBefore="@id/key5"
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
androidprv:digit="4"
|
||||||
android:layout_height="match_parent"
|
androidprv:textView="@+id/pukEntry" />
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
|
||||||
android:contentDescription="@string/keyboardview_keycode_delete"
|
<com.android.keyguard.NumPadKey
|
||||||
style="@style/NumPadKey.Delete"
|
android:id="@+id/key5"
|
||||||
/>
|
android:layout_width="0dp"
|
||||||
<com.android.keyguard.NumPadKey
|
android:layout_height="0dp"
|
||||||
android:id="@+id/key0"
|
android:accessibilityTraversalBefore="@id/key6"
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
androidprv:digit="5"
|
||||||
android:layout_height="match_parent"
|
androidprv:textView="@+id/pukEntry" />
|
||||||
android:layout_marginEnd="@dimen/num_pad_key_margin_end"
|
|
||||||
androidprv:textView="@+id/pukEntry"
|
|
||||||
androidprv:digit="0"
|
<com.android.keyguard.NumPadKey
|
||||||
/>
|
android:id="@+id/key6"
|
||||||
<com.android.keyguard.NumPadButton
|
android:layout_width="0dp"
|
||||||
android:id="@+id/key_enter"
|
android:layout_height="0dp"
|
||||||
android:layout_width="@dimen/num_pad_key_width"
|
android:accessibilityTraversalBefore="@id/key7"
|
||||||
android:layout_height="match_parent"
|
androidprv:digit="6"
|
||||||
style="@style/NumPadKey.Enter"
|
androidprv:textView="@+id/pukEntry" />
|
||||||
android:contentDescription="@string/keyboardview_keycode_enter"
|
|
||||||
/>
|
<com.android.keyguard.NumPadKey
|
||||||
</LinearLayout>
|
android:id="@+id/key7"
|
||||||
</LinearLayout>
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:accessibilityTraversalBefore="@id/key8"
|
||||||
|
androidprv:digit="7"
|
||||||
|
androidprv:textView="@+id/pukEntry" />
|
||||||
|
|
||||||
|
<com.android.keyguard.NumPadKey
|
||||||
|
android:id="@+id/key8"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:accessibilityTraversalBefore="@id/key9"
|
||||||
|
androidprv:digit="8"
|
||||||
|
androidprv:textView="@+id/pukEntry" />
|
||||||
|
|
||||||
|
<com.android.keyguard.NumPadKey
|
||||||
|
android:id="@+id/key9"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:accessibilityTraversalBefore="@id/delete_button"
|
||||||
|
androidprv:digit="9"
|
||||||
|
androidprv:textView="@+id/pukEntry" />
|
||||||
|
|
||||||
|
<com.android.keyguard.NumPadKey
|
||||||
|
android:id="@+id/key0"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:accessibilityTraversalBefore="@id/key_enter"
|
||||||
|
androidprv:digit="0"
|
||||||
|
androidprv:textView="@+id/pukEntry" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<include layout="@layout/keyguard_eca"
|
<include layout="@layout/keyguard_eca"
|
||||||
android:id="@+id/keyguard_selector_fade_container"
|
android:id="@+id/keyguard_selector_fade_container"
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ class NumPadAnimator {
|
|||||||
private float mStartRadius;
|
private float mStartRadius;
|
||||||
private float mEndRadius;
|
private float mEndRadius;
|
||||||
private int mHeight;
|
private int mHeight;
|
||||||
private boolean mInitialized;
|
|
||||||
|
|
||||||
private static final int EXPAND_ANIMATION_MS = 100;
|
private static final int EXPAND_ANIMATION_MS = 100;
|
||||||
private static final int EXPAND_COLOR_ANIMATION_MS = 50;
|
private static final int EXPAND_COLOR_ANIMATION_MS = 50;
|
||||||
@@ -93,15 +92,15 @@ class NumPadAnimator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void onLayout(int height) {
|
void onLayout(int height) {
|
||||||
|
boolean shouldUpdateHeight = height != mHeight;
|
||||||
mHeight = height;
|
mHeight = height;
|
||||||
mStartRadius = height / 2f;
|
mStartRadius = height / 2f;
|
||||||
mEndRadius = height / 4f;
|
mEndRadius = height / 4f;
|
||||||
mExpandAnimator.setFloatValues(mStartRadius, mEndRadius);
|
mExpandAnimator.setFloatValues(mStartRadius, mEndRadius);
|
||||||
mContractAnimator.setFloatValues(mEndRadius, mStartRadius);
|
mContractAnimator.setFloatValues(mEndRadius, mStartRadius);
|
||||||
// Set initial corner radius.
|
// Set initial corner radius.
|
||||||
if (!mInitialized) {
|
if (shouldUpdateHeight) {
|
||||||
mBackground.setCornerRadius(mStartRadius);
|
mBackground.setCornerRadius(mStartRadius);
|
||||||
mInitialized = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user