Implement new PIN UX.

This commit is contained in:
Alex Hart
2020-01-30 16:23:29 -04:00
parent 109d67956f
commit fb82420376
71 changed files with 3000 additions and 203 deletions

View 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>

View 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>

View File

@@ -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"