From a9653badb94c1ec2d1ca21c0bab747cb4ecc5fb0 Mon Sep 17 00:00:00 2001 From: Devin Morgan Date: Thu, 25 Apr 2024 13:52:49 -0400 Subject: [PATCH] Reveal keyboard for BT's TextElement Version 2.5.0 did not support a programmatic way to reveal the keyboard when it's TextElement's were focussed but their version 4.2.0 does. (this commit also lowkey applies spotless) Signed-off-by: Devin Morgan --- forage-android/build.gradle | 2 +- .../com/joinforage/forage/android/ui/ForagePINEditText.kt | 5 +++-- .../example/ui/complete/flow/balance/FlowBalanceFragment.kt | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/forage-android/build.gradle b/forage-android/build.gradle index ad4f524d..3f69a7bf 100644 --- a/forage-android/build.gradle +++ b/forage-android/build.gradle @@ -122,7 +122,7 @@ dependencies { api 'com.verygoodsecurity:vgscollect:1.7.3' // Basis Theory SDK - implementation ('com.github.basis-theory:basistheory-android:2.5.0') { + implementation ('com.github.basis-theory:basistheory-android:4.2.0') { // Unable to build without excluding this dependency // based on advice from this thread: https://github.com/gradle/gradle/issues/3065#issuecomment-341418873 exclude group: 'javax.ws.rs' diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ui/ForagePINEditText.kt b/forage-android/src/main/java/com/joinforage/forage/android/ui/ForagePINEditText.kt index a9316ebc..6cd86378 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ui/ForagePINEditText.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ui/ForagePINEditText.kt @@ -66,10 +66,11 @@ class ForagePINEditText @JvmOverloads constructor( private val forageVaultWrapper: ForageVaultWrapper override fun showKeyboard() { - if (vault.getVaultType() == VaultType.VGS_VAULT_TYPE) + if (vault.getVaultType() == VaultType.VGS_VAULT_TYPE) { vault.getVGSEditText().showKeyboard() + } if (vault.getVaultType() == VaultType.BT_VAULT_TYPE) { - TODO("currently blocked by BT's lack of this functionality") + vault.getTextElement().showKeyboard(0) } } diff --git a/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/balance/FlowBalanceFragment.kt b/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/balance/FlowBalanceFragment.kt index 78fc4646..56675c83 100644 --- a/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/balance/FlowBalanceFragment.kt +++ b/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/balance/FlowBalanceFragment.kt @@ -34,7 +34,6 @@ class FlowBalanceFragment : Fragment() { foragePinEditText.showKeyboard() } - override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?,