From b7de25c4c6d46e06cb487e70a0d3579e9571528a Mon Sep 17 00:00:00 2001 From: dankl Date: Sat, 25 Jan 2020 19:18:08 +0100 Subject: [PATCH] Fixed that AddAccountDialog's AutoCompleteTextView's ListView covers keyboard so that banks get accidently selected; Also made Dialogs scrollable so that parts out of screen can be scrolled into view when keyboard is displayed --- .../android/ui/dialogs/AddAccountDialog.kt | 2 +- .../android/ui/dialogs/EnterAtcDialog.kt | 2 +- .../android/ui/dialogs/EnterTanDialog.kt | 4 +- .../android/ui/dialogs/TransferMoneyDialog.kt | 2 +- .../src/main/res/layout/dialog_enter_atc.xml | 184 +++++----- .../src/main/res/layout/dialog_enter_tan.xml | 254 +++++++------- .../main/res/layout/dialog_transfer_money.xml | 326 +++++++++--------- .../src/main/res/values/styles.xml | 6 + 8 files changed, 405 insertions(+), 375 deletions(-) diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/AddAccountDialog.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/AddAccountDialog.kt index 96f368ce..5a82d889 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/AddAccountDialog.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/AddAccountDialog.kt @@ -42,7 +42,7 @@ open class AddAccountDialog : DialogFragment() { // presenter.preloadBanksAsync() this.adapter = BankListAdapter(presenter) - val style = if(fullscreen) R.style.FullscreenDialogWithStatusBar else R.style.Dialog + val style = if(fullscreen) R.style.FullscreenDialogWithStatusBar else R.style.FloatingDialog setStyle(STYLE_NORMAL, style) show(activity.supportFragmentManager, DialogTag) diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/EnterAtcDialog.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/EnterAtcDialog.kt index a94ccb39..1e05844e 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/EnterAtcDialog.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/EnterAtcDialog.kt @@ -32,7 +32,7 @@ open class EnterAtcDialog : DialogFragment() { this.tanMedium = tanMedium this.atcEnteredCallback = atcEnteredCallback - val style = if(fullscreen) R.style.FullscreenDialogWithStatusBar else R.style.Dialog + val style = if(fullscreen) R.style.FullscreenDialogWithStatusBar else R.style.FloatingDialog setStyle(STYLE_NORMAL, style) show(activity.supportFragmentManager, DialogTag) diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/EnterTanDialog.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/EnterTanDialog.kt index 9a20b4ba..f08de959 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/EnterTanDialog.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/EnterTanDialog.kt @@ -52,7 +52,7 @@ open class EnterTanDialog : DialogFragment() { this.presenter = presenter this.tanEnteredCallback = tanEnteredCallback - val style = if(fullscreen) R.style.FullscreenDialogWithStatusBar else R.style.Dialog + val style = if(fullscreen) R.style.FullscreenDialogWithStatusBar else R.style.FloatingDialog setStyle(STYLE_NORMAL, style) show(activity.supportFragmentManager, DialogTag) @@ -116,7 +116,7 @@ open class EnterTanDialog : DialogFragment() { // TODO: find a way to update account.tanMedia afterwards } - // TODO: what to do if newActiveTanMedium.originalObject is not of type TanGeneratorTanMedium? + // TODO: ensure that only TanGeneratorTanMedium instances get added to spinner? } } } diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt index 5f0da977..8203b902 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt @@ -52,7 +52,7 @@ open class TransferMoneyDialog : DialogFragment() { this.preselectedBankAccount = preselectedBankAccount this.preselectedValues = preselectedValues - val style = if(fullscreen) R.style.FullscreenDialogWithStatusBar else R.style.Dialog + val style = if(fullscreen) R.style.FullscreenDialogWithStatusBar else R.style.FloatingDialog setStyle(STYLE_NORMAL, style) show(activity.supportFragmentManager, DialogTag) diff --git a/fints4javaAndroidApp/src/main/res/layout/dialog_enter_atc.xml b/fints4javaAndroidApp/src/main/res/layout/dialog_enter_atc.xml index f2ffe60c..e43f5a1b 100644 --- a/fints4javaAndroidApp/src/main/res/layout/dialog_enter_atc.xml +++ b/fints4javaAndroidApp/src/main/res/layout/dialog_enter_atc.xml @@ -1,98 +1,106 @@ - - - - - - - - - - - - - - + + + - + + + + + + + + + + + + + + + + + + + +