mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-03 23:15:44 +01:00
Payments.
Co-authored-by: Alan Evans <alan@signal.org> Co-authored-by: Alex Hart <alex@signal.org> Co-authored-by: Cody Henthorne <cody@signal.org>
This commit is contained in:
119
app/src/main/res/navigation/payments_backup.xml
Normal file
119
app/src/main/res/navigation/payments_backup.xml
Normal file
@@ -0,0 +1,119 @@
|
||||
<?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/payments_backup"
|
||||
app:startDestination="@id/paymentsRecoveryStart">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/paymentsRecoveryStart"
|
||||
android:name="org.thoughtcrime.securesms.payments.backup.PaymentsRecoveryStartFragment"
|
||||
android:label="payments_recovery_start"
|
||||
tools:layout="@layout/payments_recovery_start_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsRecoveryStart_to_paymentsRecoveryPhrase"
|
||||
app:destination="@id/paymentsRecoveryPhrase"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_close_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit"
|
||||
app:popUpTo="@id/paymentsHome" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsRecoveryStart_to_paymentsRecoveryEntry"
|
||||
app:destination="@id/paymentsRecoveryEntry"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_close_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsRecoveryStart_to_paymentsRecoveryPaste"
|
||||
app:destination="@id/paymentsRecoveryPaste"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_close_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<argument
|
||||
android:name="is_restore"
|
||||
android:defaultValue="false"
|
||||
app:argType="boolean" />
|
||||
|
||||
<argument
|
||||
android:name="finish_on_confirm"
|
||||
android:defaultValue="false"
|
||||
app:argType="boolean"
|
||||
app:nullable="false" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/paymentsRecoveryPhrase"
|
||||
android:name="org.thoughtcrime.securesms.payments.backup.phrase.PaymentsRecoveryPhraseFragment"
|
||||
android:label="payments_recovery_phrase"
|
||||
tools:layout="@layout/payments_recovery_phrase_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsRecoveryPhrase_to_paymentsRecoveryPhraseConfirm"
|
||||
app:destination="@id/paymentsRecoveryPhraseConfirm"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_close_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<argument
|
||||
android:name="finish_on_confirm"
|
||||
app:argType="boolean"
|
||||
app:nullable="false" />
|
||||
|
||||
<argument
|
||||
android:name="words"
|
||||
android:defaultValue="@null"
|
||||
app:argType="string[]"
|
||||
app:nullable="true" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/paymentsRecoveryEntry"
|
||||
android:name="org.thoughtcrime.securesms.payments.backup.entry.PaymentsRecoveryEntryFragment"
|
||||
android:label="payments_recovery_entry"
|
||||
tools:layout="@layout/payments_recovery_entry_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsRecoveryEntry_to_paymentsRecoveryPhrase"
|
||||
app:destination="@id/paymentsRecoveryPhrase"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_close_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/paymentsRecoveryPaste"
|
||||
android:name="org.thoughtcrime.securesms.payments.backup.PaymentsRecoveryPasteFragment"
|
||||
android:label="payments_recovery_paste"
|
||||
tools:layout="@layout/payments_recovery_paste_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsRecoveryEntry_to_paymentsRecoveryPhrase"
|
||||
app:destination="@id/paymentsRecoveryPhrase"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_close_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/paymentsRecoveryPhraseConfirm"
|
||||
android:name="org.thoughtcrime.securesms.payments.backup.confirm.PaymentsRecoveryPhraseConfirmFragment"
|
||||
android:label="payments_recovery_phrase_confirm"
|
||||
tools:layout="@layout/payments_recovery_phrase_confirm_fragment">
|
||||
|
||||
<argument
|
||||
android:name="finish_on_confirm"
|
||||
app:argType="boolean"
|
||||
app:nullable="false" />
|
||||
</fragment>
|
||||
|
||||
</navigation>
|
||||
65
app/src/main/res/navigation/payments_create.xml
Normal file
65
app/src/main/res/navigation/payments_create.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?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/payments_create"
|
||||
app:startDestination="@id/createPaymentFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/createPaymentFragment"
|
||||
android:name="org.thoughtcrime.securesms.payments.create.CreatePaymentFragment"
|
||||
tools:layout="@layout/create_payment_fragment">
|
||||
|
||||
<argument
|
||||
android:name="payee"
|
||||
app:argType="org.thoughtcrime.securesms.payments.preferences.model.PayeeParcelable"
|
||||
app:nullable="false" />
|
||||
|
||||
<argument
|
||||
android:name="note"
|
||||
android:defaultValue="@null"
|
||||
app:argType="string"
|
||||
app:nullable="true" />
|
||||
|
||||
<argument
|
||||
android:name="finish_on_confirm"
|
||||
app:argType="boolean"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_createPaymentFragment_to_editPaymentNoteFragment"
|
||||
app:destination="@id/editPaymentNoteFragment"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_close_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_createPaymentFragment_to_confirmPaymentFragment"
|
||||
app:destination="@id/confirmPaymentFragment" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/editPaymentNoteFragment"
|
||||
android:name="org.thoughtcrime.securesms.payments.create.EditNoteFragment"
|
||||
tools:layout="@layout/edit_note_fragment" />
|
||||
|
||||
<dialog
|
||||
android:id="@+id/confirmPaymentFragment"
|
||||
android:name="org.thoughtcrime.securesms.payments.confirm.ConfirmPaymentFragment"
|
||||
tools:layout="@layout/confirm_payment_fragment">
|
||||
|
||||
<argument
|
||||
android:name="createPaymentDetails"
|
||||
app:argType="org.thoughtcrime.securesms.payments.CreatePaymentDetails"
|
||||
app:nullable="false" />
|
||||
|
||||
<argument
|
||||
android:name="finish_on_confirm"
|
||||
app:argType="boolean"
|
||||
android:defaultValue="false" />
|
||||
|
||||
</dialog>
|
||||
|
||||
</navigation>
|
||||
219
app/src/main/res/navigation/payments_preferences.xml
Normal file
219
app/src/main/res/navigation/payments_preferences.xml
Normal file
@@ -0,0 +1,219 @@
|
||||
<?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/payment_preferences"
|
||||
app:startDestination="@id/paymentsHome">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/paymentsHome"
|
||||
android:name="org.thoughtcrime.securesms.payments.preferences.PaymentsHomeFragment"
|
||||
tools:layout="@layout/payments_home_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsHome_to_paymentsAllActivity"
|
||||
app:destination="@id/paymentsAllActivity"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsHome_to_paymentsAddMoney"
|
||||
app:destination="@id/paymentsAddMoney"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsHome_to_paymentRecipientSelectionFragment"
|
||||
app:destination="@id/paymentRecipientSelectionFragment"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsHome_to_paymentsTransfer"
|
||||
app:destination="@id/payments_transfer"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsHome_to_setCurrency"
|
||||
app:destination="@id/setCurrency"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsHome_to_deactivateWallet"
|
||||
app:destination="@id/deactivateWallet"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsHome_to_paymentsBackup"
|
||||
app:destination="@id/payments_backup"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit">
|
||||
|
||||
<argument
|
||||
android:name="is_restore"
|
||||
android:defaultValue="false"
|
||||
app:argType="boolean" />
|
||||
|
||||
</action>
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/paymentsAllActivity"
|
||||
android:name="org.thoughtcrime.securesms.payments.preferences.PaymentsAllActivityFragment"
|
||||
tools:layout="@layout/payments_activity_fragment">
|
||||
|
||||
<argument
|
||||
android:name="paymentType"
|
||||
app:argType="org.thoughtcrime.securesms.payments.preferences.PaymentType" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/paymentDetails"
|
||||
android:name="org.thoughtcrime.securesms.payments.preferences.details.PaymentDetailsFragment"
|
||||
tools:layout="@layout/payment_details_fragment">
|
||||
|
||||
<argument
|
||||
android:name="paymentDetails"
|
||||
app:argType="org.thoughtcrime.securesms.payments.preferences.details.PaymentDetailsParcelable"
|
||||
app:nullable="false" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/paymentRecipientSelectionFragment"
|
||||
android:name="org.thoughtcrime.securesms.payments.preferences.PaymentRecipientSelectionFragment"
|
||||
tools:layout="@layout/payment_recipient_selection_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentRecipientSelection_to_createPayment"
|
||||
app:destination="@id/payments_create"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit">
|
||||
|
||||
<argument
|
||||
android:name="payee"
|
||||
app:argType="org.thoughtcrime.securesms.payments.preferences.model.PayeeParcelable"
|
||||
app:nullable="false" />
|
||||
|
||||
<argument
|
||||
android:name="note"
|
||||
android:defaultValue="@null"
|
||||
app:argType="string"
|
||||
app:nullable="true" />
|
||||
|
||||
</action>
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/paymentsAddMoney"
|
||||
android:name="org.thoughtcrime.securesms.payments.preferences.addmoney.PaymentsAddMoneyFragment"
|
||||
tools:layout="@layout/payments_add_money_fragment" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/setCurrency"
|
||||
android:name="org.thoughtcrime.securesms.payments.preferences.SetCurrencyFragment"
|
||||
tools:layout="@layout/set_currency_fragment" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/deactivateWallet"
|
||||
android:name="org.thoughtcrime.securesms.payments.deactivate.DeactivateWalletFragment"
|
||||
tools:layout="@layout/deactivate_wallet_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_deactivateWallet_to_paymentsTransfer"
|
||||
app:destination="@id/payments_transfer"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit"
|
||||
app:popUpTo="@id/paymentsHome"
|
||||
app:popUpToInclusive="false" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_directly_to_createPayment"
|
||||
app:destination="@id/payments_create"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit"
|
||||
app:popUpTo="@id/paymentsHome"
|
||||
app:popUpToInclusive="true">
|
||||
|
||||
<argument
|
||||
android:name="payee"
|
||||
app:argType="org.thoughtcrime.securesms.payments.preferences.model.PayeeParcelable"
|
||||
app:nullable="false" />
|
||||
|
||||
<argument
|
||||
android:name="note"
|
||||
android:defaultValue="@null"
|
||||
app:argType="string"
|
||||
app:nullable="true" />
|
||||
|
||||
</action>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_directly_to_paymentsHome"
|
||||
app:destination="@id/paymentsHome"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit"
|
||||
app:popUpTo="@id/paymentsHome"
|
||||
app:popUpToInclusive="false" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_directly_to_paymentDetails"
|
||||
app:destination="@id/paymentDetails"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_directly_to_paymentsTransfer"
|
||||
app:destination="@id/payments_transfer"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_directly_to_paymentsBackup"
|
||||
app:destination="@id/payments_backup"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<include app:graph="@navigation/payments_create" />
|
||||
|
||||
<include app:graph="@navigation/payments_transfer" />
|
||||
|
||||
<include app:graph="@navigation/payments_backup" />
|
||||
|
||||
</navigation>
|
||||
64
app/src/main/res/navigation/payments_transfer.xml
Normal file
64
app/src/main/res/navigation/payments_transfer.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?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/payments_transfer"
|
||||
app:startDestination="@id/paymentsTransfer">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/paymentsTransfer"
|
||||
android:name="org.thoughtcrime.securesms.payments.preferences.transfer.PaymentsTransferFragment"
|
||||
tools:layout="@layout/payments_transfer_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsTransfer_to_paymentsScanQr"
|
||||
app:destination="@id/paymentsScanQr"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsTransfer_to_createPayment"
|
||||
app:destination="@id/payments_create"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit">
|
||||
|
||||
<argument
|
||||
android:name="payee"
|
||||
app:argType="org.thoughtcrime.securesms.payments.preferences.model.PayeeParcelable"
|
||||
app:nullable="false" />
|
||||
|
||||
<argument
|
||||
android:name="finish_on_confirm"
|
||||
android:defaultValue="false"
|
||||
app:argType="boolean"
|
||||
app:nullable="false" />
|
||||
|
||||
</action>
|
||||
|
||||
<argument
|
||||
android:name="finish_on_confirm"
|
||||
android:defaultValue="false"
|
||||
app:argType="boolean"
|
||||
app:nullable="false" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/paymentsScanQr"
|
||||
android:name="org.thoughtcrime.securesms.payments.preferences.transfer.PaymentsTransferQrScanFragment"
|
||||
tools:layout="@layout/payments_transfer_qr_scan_fragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_paymentsScanQr_pop"
|
||||
app:popUpTo="@id/paymentsScanQr"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<include app:graph="@navigation/payments_create" />
|
||||
|
||||
</navigation>
|
||||
Reference in New Issue
Block a user