mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-03 15:11:42 +01:00
Implement new PIN UX.
This commit is contained in:
54
app/src/main/res/navigation/create_kbs_pin.xml
Normal file
54
app/src/main/res/navigation/create_kbs_pin.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/create_kbs_pin"
|
||||
app:startDestination="@id/createKbsPinFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/createKbsPinFragment"
|
||||
android:name="org.thoughtcrime.securesms.lock.v2.CreateKbsPinFragment"
|
||||
android:label="fragment_edit_kbs_pin"
|
||||
tools:layout="@layout/base_kbs_pin_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_confirmPin"
|
||||
app:destination="@id/confirmKbsPinFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
|
||||
<argument
|
||||
app:argType="boolean"
|
||||
android:name="is_new_pin"
|
||||
android:defaultValue="false" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/confirmKbsPinFragment"
|
||||
android:name="org.thoughtcrime.securesms.lock.v2.ConfirmKbsPinFragment"
|
||||
android:label="fragment_confirm_new_pin"
|
||||
tools:layout="@layout/base_kbs_pin_fragment">
|
||||
|
||||
<argument
|
||||
app:argType="boolean"
|
||||
android:name="is_new_pin"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<argument
|
||||
android:name="user_entry"
|
||||
android:defaultValue="@null"
|
||||
app:argType="org.thoughtcrime.securesms.lock.v2.KbsPin"
|
||||
app:nullable="true" />
|
||||
|
||||
<argument
|
||||
android:name="keyboard"
|
||||
android:defaultValue="NUMERIC"
|
||||
app:argType="org.thoughtcrime.securesms.lock.v2.KbsKeyboardType"
|
||||
app:nullable="false" />
|
||||
|
||||
</fragment>
|
||||
|
||||
</navigation>
|
||||
26
app/src/main/res/navigation/kbs_migration.xml
Normal file
26
app/src/main/res/navigation/kbs_migration.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/kbs_pin_migration"
|
||||
app:startDestination="@id/kbsSplashFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/kbsSplashFragment"
|
||||
android:name="org.thoughtcrime.securesms.lock.v2.KbsSplashFragment"
|
||||
android:label="fragment_kbs_splash"
|
||||
tools:layout="@layout/kbs_splash_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_createKbsPin"
|
||||
app:destination="@id/create_kbs_pin"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<include app:graph="@navigation/create_kbs_pin" />
|
||||
|
||||
</navigation>
|
||||
@@ -91,6 +91,16 @@
|
||||
app:popUpTo="@+id/welcomeFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_requireKbsLockPin"
|
||||
app:destination="@id/kbsLockFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@+id/welcomeFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_wrongNumber"
|
||||
app:popUpTo="@id/enterCodeFragment"
|
||||
@@ -134,6 +144,49 @@
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/kbsLockFragment"
|
||||
android:name="org.thoughtcrime.securesms.registration.fragments.KbsLockFragment"
|
||||
android:label="fragment_kbs_lock"
|
||||
tools:layout="@layout/kbs_lock_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_successfulRegistration"
|
||||
app:destination="@id/registrationCompletePlaceHolderFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@+id/welcomeFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_accountLocked"
|
||||
app:destination="@id/accountLockedFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@+id/welcomeFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
<argument
|
||||
android:name="timeRemaining"
|
||||
app:argType="long" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/accountLockedFragment"
|
||||
android:name="org.thoughtcrime.securesms.registration.fragments.AccountLockedFragment"
|
||||
android:label="fragment_account_locked"
|
||||
tools:layout="@layout/account_locked_fragment">
|
||||
|
||||
<argument
|
||||
android:name="timeRemaining"
|
||||
app:argType="long" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/captchaFragment"
|
||||
android:name="org.thoughtcrime.securesms.registration.fragments.CaptchaFragment"
|
||||
|
||||
Reference in New Issue
Block a user