From 792b64951a710ec80658c430176f1a1c054ba17e Mon Sep 17 00:00:00 2001 From: ardocrat Date: Sun, 21 Apr 2024 20:42:01 +0300 Subject: [PATCH] android: move to separate folder, hide keyboard at request modal --- .gitignore | 9 ++++----- {app => android/app}/.gitignore | 0 {app => android/app}/build.gradle | 0 {app => android/app}/proguard-rules.pro | 0 {app => android/app}/src/main/AndroidManifest.xml | 0 .../app}/src/main/ic_launcher-playstore.png | Bin .../main/java/mw/gri/android/BackgroundService.java | 0 .../src/main/java/mw/gri/android/MainActivity.java | 0 .../app}/src/main/java/mw/gri/android/Utils.java | 0 .../src/main/res/drawable-hdpi/ic_stat_name.png | Bin .../src/main/res/drawable-mdpi/ic_stat_name.png | Bin .../src/main/res/drawable-xhdpi/ic_stat_name.png | Bin .../src/main/res/drawable-xxhdpi/ic_stat_name.png | Bin .../src/main/res/drawable-xxxhdpi/ic_stat_name.png | Bin .../src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 0 .../res/mipmap-anydpi-v26/ic_launcher_round.xml | 0 .../app}/src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../main/res/mipmap-hdpi/ic_launcher_foreground.png | Bin .../src/main/res/mipmap-hdpi/ic_launcher_round.png | Bin .../app}/src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../main/res/mipmap-mdpi/ic_launcher_foreground.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher_round.png | Bin .../app}/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../res/mipmap-xhdpi/ic_launcher_foreground.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher_round.png | Bin .../app}/src/main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../res/mipmap-xxhdpi/ic_launcher_foreground.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../res/mipmap-xxxhdpi/ic_launcher_foreground.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher_round.png | Bin {app => android/app}/src/main/res/values/colors.xml | 0 .../src/main/res/values/ic_launcher_background.xml | 0 {app => android/app}/src/main/res/values/themes.xml | 0 build.gradle => android/build.gradle | 0 gradle.properties => android/gradle.properties | 0 .../gradle}/wrapper/gradle-wrapper.jar | Bin .../gradle}/wrapper/gradle-wrapper.properties | 0 gradlew => android/gradlew | 0 gradlew.bat => android/gradlew.bat | 0 settings.gradle => android/settings.gradle | 0 build_run_android.sh | 3 ++- src/gui/views/wallets/wallet/messages.rs | 2 ++ 43 files changed, 8 insertions(+), 6 deletions(-) rename {app => android/app}/.gitignore (100%) rename {app => android/app}/build.gradle (100%) rename {app => android/app}/proguard-rules.pro (100%) rename {app => android/app}/src/main/AndroidManifest.xml (100%) rename {app => android/app}/src/main/ic_launcher-playstore.png (100%) rename {app => android/app}/src/main/java/mw/gri/android/BackgroundService.java (100%) rename {app => android/app}/src/main/java/mw/gri/android/MainActivity.java (100%) rename {app => android/app}/src/main/java/mw/gri/android/Utils.java (100%) rename {app => android/app}/src/main/res/drawable-hdpi/ic_stat_name.png (100%) rename {app => android/app}/src/main/res/drawable-mdpi/ic_stat_name.png (100%) rename {app => android/app}/src/main/res/drawable-xhdpi/ic_stat_name.png (100%) rename {app => android/app}/src/main/res/drawable-xxhdpi/ic_stat_name.png (100%) rename {app => android/app}/src/main/res/drawable-xxxhdpi/ic_stat_name.png (100%) rename {app => android/app}/src/main/res/mipmap-anydpi-v26/ic_launcher.xml (100%) rename {app => android/app}/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml (100%) rename {app => android/app}/src/main/res/mipmap-hdpi/ic_launcher.png (100%) rename {app => android/app}/src/main/res/mipmap-hdpi/ic_launcher_foreground.png (100%) rename {app => android/app}/src/main/res/mipmap-hdpi/ic_launcher_round.png (100%) rename {app => android/app}/src/main/res/mipmap-mdpi/ic_launcher.png (100%) rename {app => android/app}/src/main/res/mipmap-mdpi/ic_launcher_foreground.png (100%) rename {app => android/app}/src/main/res/mipmap-mdpi/ic_launcher_round.png (100%) rename {app => android/app}/src/main/res/mipmap-xhdpi/ic_launcher.png (100%) rename {app => android/app}/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png (100%) rename {app => android/app}/src/main/res/mipmap-xhdpi/ic_launcher_round.png (100%) rename {app => android/app}/src/main/res/mipmap-xxhdpi/ic_launcher.png (100%) rename {app => android/app}/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png (100%) rename {app => android/app}/src/main/res/mipmap-xxhdpi/ic_launcher_round.png (100%) rename {app => android/app}/src/main/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename {app => android/app}/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png (100%) rename {app => android/app}/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png (100%) rename {app => android/app}/src/main/res/values/colors.xml (100%) rename {app => android/app}/src/main/res/values/ic_launcher_background.xml (100%) rename {app => android/app}/src/main/res/values/themes.xml (100%) rename build.gradle => android/build.gradle (100%) rename gradle.properties => android/gradle.properties (100%) rename {gradle => android/gradle}/wrapper/gradle-wrapper.jar (100%) rename {gradle => android/gradle}/wrapper/gradle-wrapper.properties (100%) rename gradlew => android/gradlew (100%) rename gradlew.bat => android/gradlew.bat (100%) rename settings.gradle => android/settings.gradle (100%) diff --git a/.gitignore b/.gitignore index f5507e3..1fbcf5c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,15 @@ *.iml -.gradle -/local.properties +android/.gradle +android/local.properties +android/keystore +android/keystore.properties /.idea .DS_Store /build /captures .externalNativeBuild .cxx -local.properties *.so -keystore -keystore.properties # Added by cargo /target diff --git a/app/.gitignore b/android/app/.gitignore similarity index 100% rename from app/.gitignore rename to android/app/.gitignore diff --git a/app/build.gradle b/android/app/build.gradle similarity index 100% rename from app/build.gradle rename to android/app/build.gradle diff --git a/app/proguard-rules.pro b/android/app/proguard-rules.pro similarity index 100% rename from app/proguard-rules.pro rename to android/app/proguard-rules.pro diff --git a/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml similarity index 100% rename from app/src/main/AndroidManifest.xml rename to android/app/src/main/AndroidManifest.xml diff --git a/app/src/main/ic_launcher-playstore.png b/android/app/src/main/ic_launcher-playstore.png similarity index 100% rename from app/src/main/ic_launcher-playstore.png rename to android/app/src/main/ic_launcher-playstore.png diff --git a/app/src/main/java/mw/gri/android/BackgroundService.java b/android/app/src/main/java/mw/gri/android/BackgroundService.java similarity index 100% rename from app/src/main/java/mw/gri/android/BackgroundService.java rename to android/app/src/main/java/mw/gri/android/BackgroundService.java diff --git a/app/src/main/java/mw/gri/android/MainActivity.java b/android/app/src/main/java/mw/gri/android/MainActivity.java similarity index 100% rename from app/src/main/java/mw/gri/android/MainActivity.java rename to android/app/src/main/java/mw/gri/android/MainActivity.java diff --git a/app/src/main/java/mw/gri/android/Utils.java b/android/app/src/main/java/mw/gri/android/Utils.java similarity index 100% rename from app/src/main/java/mw/gri/android/Utils.java rename to android/app/src/main/java/mw/gri/android/Utils.java diff --git a/app/src/main/res/drawable-hdpi/ic_stat_name.png b/android/app/src/main/res/drawable-hdpi/ic_stat_name.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_stat_name.png rename to android/app/src/main/res/drawable-hdpi/ic_stat_name.png diff --git a/app/src/main/res/drawable-mdpi/ic_stat_name.png b/android/app/src/main/res/drawable-mdpi/ic_stat_name.png similarity index 100% rename from app/src/main/res/drawable-mdpi/ic_stat_name.png rename to android/app/src/main/res/drawable-mdpi/ic_stat_name.png diff --git a/app/src/main/res/drawable-xhdpi/ic_stat_name.png b/android/app/src/main/res/drawable-xhdpi/ic_stat_name.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_stat_name.png rename to android/app/src/main/res/drawable-xhdpi/ic_stat_name.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_stat_name.png b/android/app/src/main/res/drawable-xxhdpi/ic_stat_name.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/ic_stat_name.png rename to android/app/src/main/res/drawable-xxhdpi/ic_stat_name.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png b/android/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/ic_stat_name.png rename to android/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher.png rename to android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png rename to android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher_round.png rename to android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher.png rename to android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png rename to android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher_round.png rename to android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png rename to android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher_round.png rename to android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png rename to android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png rename to android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png rename to android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png rename to android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml similarity index 100% rename from app/src/main/res/values/colors.xml rename to android/app/src/main/res/values/colors.xml diff --git a/app/src/main/res/values/ic_launcher_background.xml b/android/app/src/main/res/values/ic_launcher_background.xml similarity index 100% rename from app/src/main/res/values/ic_launcher_background.xml rename to android/app/src/main/res/values/ic_launcher_background.xml diff --git a/app/src/main/res/values/themes.xml b/android/app/src/main/res/values/themes.xml similarity index 100% rename from app/src/main/res/values/themes.xml rename to android/app/src/main/res/values/themes.xml diff --git a/build.gradle b/android/build.gradle similarity index 100% rename from build.gradle rename to android/build.gradle diff --git a/gradle.properties b/android/gradle.properties similarity index 100% rename from gradle.properties rename to android/gradle.properties diff --git a/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from gradle/wrapper/gradle-wrapper.jar rename to android/gradle/wrapper/gradle-wrapper.jar diff --git a/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from gradle/wrapper/gradle-wrapper.properties rename to android/gradle/wrapper/gradle-wrapper.properties diff --git a/gradlew b/android/gradlew similarity index 100% rename from gradlew rename to android/gradlew diff --git a/gradlew.bat b/android/gradlew.bat similarity index 100% rename from gradlew.bat rename to android/gradlew.bat diff --git a/settings.gradle b/android/settings.gradle similarity index 100% rename from settings.gradle rename to android/settings.gradle diff --git a/build_run_android.sh b/build_run_android.sh index d39b007..f74d286 100755 --- a/build_run_android.sh +++ b/build_run_android.sh @@ -38,7 +38,8 @@ export CPPFLAGS="-DMDB_USE_ROBUST=0" && export CFLAGS="-DMDB_USE_ROBUST=0" \ if [ $? -eq 0 ] then - yes | mkdir -p app/src/main/jniLibs/${arch} && cp -f target/${platform}/${type}/libgrim.so app/src/main/jniLibs/${arch} + yes | mkdir -p android/app/src/main/jniLibs/${arch} && cp -f target/${platform}/${type}/libgrim.so android/app/src/main/jniLibs/${arch} + cd android ./gradlew clean ./gradlew build # Install on several devices diff --git a/src/gui/views/wallets/wallet/messages.rs b/src/gui/views/wallets/wallet/messages.rs index 1f7850d..f8d4468 100644 --- a/src/gui/views/wallets/wallet/messages.rs +++ b/src/gui/views/wallets/wallet/messages.rs @@ -619,6 +619,7 @@ impl WalletMessages { View::button(ui, t!("modal.cancel"), Colors::WHITE, || { self.amount_edit = "".to_string(); self.request_error = None; + cb.hide_keyboard(); modal.close(); }); }); @@ -718,6 +719,7 @@ impl WalletMessages { } self.amount_edit = "".to_string(); self.request_edit = "".to_string(); + cb.hide_keyboard(); modal.close(); }); });