forked from thijooree/android
redesign pin and pattern UI, add settings for changing lock and enable/disable biometrics and add button to lock app from any screen
This commit is contained in:
@@ -11,11 +11,16 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="48dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:paddingBottom="40dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<!-- Top spacer: equal weight to bottom spacer centers the title between screen top and numpad -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -31,8 +36,13 @@
|
||||
android:text="@string/unlock_pin_subtitle"
|
||||
android:textAppearance="?attr/textAppearanceBodyMedium"
|
||||
android:textColor="?attr/colorOnSurfaceVariant"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="24dp" />
|
||||
android:gravity="center" />
|
||||
|
||||
<!-- Bottom spacer: equal weight centers title in the space above the numpad -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLockPinDots"
|
||||
@@ -42,14 +52,14 @@
|
||||
android:textSize="26sp"
|
||||
android:letterSpacing="0.3"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:layout_marginBottom="20dp" />
|
||||
android:layout_marginBottom="24dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lockNumpadContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" />
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnLockBiometricFromPin"
|
||||
@@ -57,7 +67,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/use_biometrics"
|
||||
android:visibility="gone" />
|
||||
|
||||
@@ -69,12 +79,16 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="48dp"
|
||||
android:paddingHorizontal="32dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:paddingBottom="40dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<!-- Top spacer: equal weight to bottom spacer centers the title -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -90,8 +104,13 @@
|
||||
android:text="@string/unlock_pattern_subtitle"
|
||||
android:textAppearance="?attr/textAppearanceBodyMedium"
|
||||
android:textColor="?attr/colorOnSurfaceVariant"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="24dp" />
|
||||
android:gravity="center" />
|
||||
|
||||
<!-- Bottom spacer: equal weight centers title in the space above the pattern -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPatternHint"
|
||||
@@ -106,13 +125,15 @@
|
||||
android:id="@+id/lockPatternView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="2"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnLockBiometricFromPattern"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/use_biometrics"
|
||||
android:visibility="gone" />
|
||||
|
||||
Reference in New Issue
Block a user