From 66e61d9064a3a44ef5e1b443359069128968ef3f Mon Sep 17 00:00:00 2001 From: - <-> Date: Thu, 26 Sep 2024 20:22:48 +0200 Subject: [PATCH] chore: replace some fragments with activities --- app/build.gradle | 4 +- app/proguard-rules.pro | 25 - app/src/main/AndroidManifest.xml | 48 +- .../home/HomeFragment.kt => HomeActivity.kt} | 115 ++-- .../java/net/mynero/wallet/MainActivity.kt | 119 ---- .../net/mynero/wallet/OnboardingActivity.kt | 608 ++++++++++++++++++ .../net/mynero/wallet/PasswordActivity.kt | 64 ++ .../ReceiveFragment.kt => ReceiveActivity.kt} | 128 ++-- .../java/net/mynero/wallet/SendActivity.kt | 596 +++++++++++++++++ .../net/mynero/wallet/SettingsActivity.kt | 331 ++++++++++ .../java/net/mynero/wallet/StartActivity.kt | 75 +++ ...tionFragment.kt => TransactionActivity.kt} | 113 ++-- .../java/net/mynero/wallet/UtxosActivity.kt | 145 +++++ .../dialog/PasswordBottomSheetDialog.kt | 65 -- .../fragment/dialog/SendBottomSheetDialog.kt | 407 ------------ .../wallet/fragment/home/HomeViewModel.kt | 5 - .../fragment/onboarding/OnboardingFragment.kt | 350 ---------- .../onboarding/OnboardingViewModel.kt | 283 -------- .../fragment/receive/ReceiveViewModel.kt | 42 -- .../wallet/fragment/send/SendFragment.kt | 550 ---------------- .../wallet/fragment/send/SendViewModel.kt | 27 - .../fragment/settings/SettingsFragment.kt | 324 ---------- .../fragment/settings/SettingsViewModel.kt | 44 -- .../transaction/TransactionViewModel.kt | 5 - .../wallet/fragment/utxos/UtxosFragment.kt | 166 ----- .../wallet/fragment/utxos/UtxosViewModel.kt | 5 - .../wallet/service/MoneroHandlerThread.kt | 57 +- .../java/net/mynero/wallet/util/Constants.kt | 8 + .../{fragment_home.xml => activity_home.xml} | 0 app/src/main/res/layout/activity_main.xml | 20 - ...onboarding.xml => activity_onboarding.xml} | 0 ...sheet_dialog.xml => activity_password.xml} | 31 +- ...gment_receive.xml => activity_receive.xml} | 0 .../{fragment_send.xml => activity_send.xml} | 0 ...ent_settings.xml => activity_settings.xml} | 0 ...ansaction.xml => activity_transaction.xml} | 0 ...{fragment_utxos.xml => activity_utxos.xml} | 0 .../res/layout/send_bottom_sheet_dialog.xml | 300 --------- app/src/main/res/navigation/main_nav.xml | 95 --- 39 files changed, 2107 insertions(+), 3048 deletions(-) delete mode 100644 app/proguard-rules.pro rename app/src/main/java/net/mynero/wallet/{fragment/home/HomeFragment.kt => HomeActivity.kt} (68%) delete mode 100644 app/src/main/java/net/mynero/wallet/MainActivity.kt create mode 100644 app/src/main/java/net/mynero/wallet/OnboardingActivity.kt create mode 100644 app/src/main/java/net/mynero/wallet/PasswordActivity.kt rename app/src/main/java/net/mynero/wallet/{fragment/receive/ReceiveFragment.kt => ReceiveActivity.kt} (51%) create mode 100644 app/src/main/java/net/mynero/wallet/SendActivity.kt create mode 100644 app/src/main/java/net/mynero/wallet/SettingsActivity.kt create mode 100644 app/src/main/java/net/mynero/wallet/StartActivity.kt rename app/src/main/java/net/mynero/wallet/{fragment/transaction/TransactionFragment.kt => TransactionActivity.kt} (55%) create mode 100644 app/src/main/java/net/mynero/wallet/UtxosActivity.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/dialog/PasswordBottomSheetDialog.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/dialog/SendBottomSheetDialog.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/home/HomeViewModel.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingFragment.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingViewModel.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/receive/ReceiveViewModel.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/send/SendFragment.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/send/SendViewModel.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/settings/SettingsViewModel.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/transaction/TransactionViewModel.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/utxos/UtxosFragment.kt delete mode 100644 app/src/main/java/net/mynero/wallet/fragment/utxos/UtxosViewModel.kt rename app/src/main/res/layout/{fragment_home.xml => activity_home.xml} (100%) delete mode 100644 app/src/main/res/layout/activity_main.xml rename app/src/main/res/layout/{fragment_onboarding.xml => activity_onboarding.xml} (100%) rename app/src/main/res/layout/{password_bottom_sheet_dialog.xml => activity_password.xml} (73%) rename app/src/main/res/layout/{fragment_receive.xml => activity_receive.xml} (100%) rename app/src/main/res/layout/{fragment_send.xml => activity_send.xml} (100%) rename app/src/main/res/layout/{fragment_settings.xml => activity_settings.xml} (100%) rename app/src/main/res/layout/{fragment_transaction.xml => activity_transaction.xml} (100%) rename app/src/main/res/layout/{fragment_utxos.xml => activity_utxos.xml} (100%) delete mode 100644 app/src/main/res/layout/send_bottom_sheet_dialog.xml delete mode 100644 app/src/main/res/navigation/main_nav.xml diff --git a/app/build.gradle b/app/build.gradle index 63878c4..70cb168 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { minSdkVersion 22 targetSdkVersion 34 compileSdk 34 - versionCode 50900 - versionName "0.5.9 'Fluorine Fermi'" + versionCode 51000 + versionName "0.5.10 'Fluorine Fermi'" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro deleted file mode 100644 index cb4574a..0000000 --- a/app/proguard-rules.pro +++ /dev/null @@ -1,25 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in C:\Users\Test\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 79874fa..84c7400 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -19,14 +19,16 @@ android:supportsRtl="true" android:theme="@style/MyMaterialThemeOled" android:usesCleartextTraffic="true"> + + - + @@ -36,6 +38,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + (R.id.settings_imageview) + val sendButton = findViewById