From 5522993ea436e1fb0eaec98b412fc97203bfd899 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Mon, 17 Feb 2020 15:15:11 -0300 Subject: Redesign payment screen This uses a slightly different layout in landscape mode and doesn't lock the QR code scanning orientation to fix orientation detection which sometimes uses a wrong layout. --- app/build.gradle | 16 +-- app/src/main/AndroidManifest.xml | 17 ++- app/src/main/java/net/taler/wallet/MainActivity.kt | 43 +++--- app/src/main/java/net/taler/wallet/ShowBalance.kt | 15 +- app/src/main/java/net/taler/wallet/Utils.kt | 35 +++++ .../java/net/taler/wallet/WithdrawSuccessful.kt | 2 +- .../taler/wallet/payment/AlreadyPaidFragment.kt | 2 +- .../net/taler/wallet/payment/PaymentManager.kt | 2 +- .../wallet/payment/PaymentSuccessfulFragment.kt | 5 +- .../taler/wallet/payment/PromptPaymentFragment.kt | 56 ++++---- app/src/main/res/drawable/ic_check_circle.xml | 26 ++++ .../main/res/layout-w550dp/payment_bottom_bar.xml | 124 ++++++++++++++++ app/src/main/res/layout/content_main.xml | 4 +- app/src/main/res/layout/fragment_already_paid.xml | 2 +- .../res/layout/fragment_payment_successful.xml | 87 ++++++----- .../main/res/layout/fragment_prompt_payment.xml | 160 ++------------------- .../res/layout/fragment_withdraw_successful.xml | 2 +- app/src/main/res/layout/payment_bottom_bar.xml | 124 ++++++++++++++++ app/src/main/res/layout/payment_details.xml | 119 +++++++++++++++ app/src/main/res/values/strings.xml | 9 +- app/src/main/res/values/styles.xml | 8 +- 21 files changed, 590 insertions(+), 268 deletions(-) create mode 100644 app/src/main/java/net/taler/wallet/Utils.kt create mode 100644 app/src/main/res/drawable/ic_check_circle.xml create mode 100644 app/src/main/res/layout-w550dp/payment_bottom_bar.xml create mode 100644 app/src/main/res/layout/payment_bottom_bar.xml create mode 100644 app/src/main/res/layout/payment_details.xml diff --git a/app/build.gradle b/app/build.gradle index 8f40e5f..921bbb1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -48,19 +48,15 @@ android { } dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation project(":akono") + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.core:core-ktx:1.2.0' - implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'com.google.android.material:material:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - implementation project(":akono") - implementation 'com.google.guava:guava:28.0-android' + // Navigation Library def nav_version = "2.2.1" implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" implementation "androidx.navigation:navigation-ui-ktx:$nav_version" @@ -79,5 +75,9 @@ dependencies { implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1' // JSON parsing and serialization - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.9.7" + implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.10.2' + + testImplementation 'junit:junit:4.13' + androidTestImplementation 'androidx.test:runner:1.2.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 99d83c2..4b9e4da 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - - + + + + diff --git a/app/src/main/res/layout-w550dp/payment_bottom_bar.xml b/app/src/main/res/layout-w550dp/payment_bottom_bar.xml new file mode 100644 index 0000000..f9fa32a --- /dev/null +++ b/app/src/main/res/layout-w550dp/payment_bottom_bar.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + +