diff --git a/src/keepass2android-app/EntryEditActivity.cs b/src/keepass2android-app/EntryEditActivity.cs
index a9e6d351..214fd006 100644
--- a/src/keepass2android-app/EntryEditActivity.cs
+++ b/src/keepass2android-app/EntryEditActivity.cs
@@ -331,13 +331,18 @@ namespace keepass2android
}
- protected override void OnStart()
+ private bool hasRequestedKeyboardActivation = false;
+ protected override void OnStart()
{
base.OnStart();
if (PreferenceManager.GetDefaultSharedPreferences(this)
- .GetBoolean(GetString(Resource.String.UseKp2aKeyboardInKp2a_key), false))
+ .GetBoolean(GetString(Resource.String.UseKp2aKeyboardInKp2a_key), false)
+ && (!hasRequestedKeyboardActivation))
{
- CopyToClipboardService.ActivateKeyboard(this);
+ //only try this once. if the user clicks cancel, we don't want to ask again
+ // (it may happen that the activity is restarted because of the NewTask flag immediately after the dialog)
+ hasRequestedKeyboardActivation = true;
+ CopyToClipboardService.ActivateKeyboard(this);
}
}
diff --git a/src/keepass2android-app/PasswordActivity.cs b/src/keepass2android-app/PasswordActivity.cs
index 64fc1a04..dd4f675f 100644
--- a/src/keepass2android-app/PasswordActivity.cs
+++ b/src/keepass2android-app/PasswordActivity.cs
@@ -1570,15 +1570,19 @@ namespace keepass2android
base.OnPause();
}
+
+ private bool hasRequestedKeyboardActivation = false;
protected override void OnStart()
{
base.OnStart();
_starting = true;
if (PreferenceManager.GetDefaultSharedPreferences(this)
- .GetBoolean(GetString(Resource.String.UseKp2aKeyboardInKp2a_key), false))
- {
- CopyToClipboardService.ActivateKeyboard(this);
+ .GetBoolean(GetString(Resource.String.UseKp2aKeyboardInKp2a_key), false)
+ && !hasRequestedKeyboardActivation)
+ {
+ hasRequestedKeyboardActivation = true;
+ CopyToClipboardService.ActivateKeyboard(this);
}
DonateReminder.ShowDonateReminderIfAppropriate(this);
diff --git a/src/keepass2android-app/Resources/layout/switch_ime_activity_layout.xml b/src/keepass2android-app/Resources/layout/switch_ime_activity_layout.xml
index 19573fe2..c40353af 100644
--- a/src/keepass2android-app/Resources/layout/switch_ime_activity_layout.xml
+++ b/src/keepass2android-app/Resources/layout/switch_ime_activity_layout.xml
@@ -1,4 +1,9 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/keepass2android-app/Resources/values/strings.xml b/src/keepass2android-app/Resources/values/strings.xml
index 74bf9262..5d6cb2c8 100644
--- a/src/keepass2android-app/Resources/values/strings.xml
+++ b/src/keepass2android-app/Resources/values/strings.xml
@@ -1249,5 +1249,9 @@
Switch back when pressing send/go/doneQR code scanning requires Google Play Services. Please install or update Google Play Services on your device.Android keyboard settings
-
-
\ No newline at end of file
+ Note: You have enabled App - Settings - Password access - Keyboard switching - Auto-switch keyboard, but it doesn\'t seem to be configured correctly.
+ Note: You have enabled App - Password access - Autofill-Service - Autofill for TOTP entries. This can cause this window to show when you open an entry with a TOTP.
+ Note: You have enabled App - Security - Use built-in keyboard inside Keepass2Android. This can cause this window to show when you open the app or edit an entry.
+ Note: You have enabled App - Security - Password access - Keyboard switching - Switch keyboard. This can cause this window to show when you search for an entry from the browser.
+
+
\ No newline at end of file
diff --git a/src/keepass2android-app/SwitchImeActivity.cs b/src/keepass2android-app/SwitchImeActivity.cs
index 44aebdb5..37ec3cbd 100644
--- a/src/keepass2android-app/SwitchImeActivity.cs
+++ b/src/keepass2android-app/SwitchImeActivity.cs
@@ -6,6 +6,7 @@ using System.Threading;
using Android.App;
using Android.Content;
using Android.OS;
+using Android.Preferences;
using Android.Runtime;
using Android.Util;
using Android.Views;
@@ -15,8 +16,8 @@ using keepass2android;
namespace keepass2android
{
- [Activity(Label = AppNames.AppName, TaskAffinity = "", NoHistory = true)]
- public class SwitchImeActivity : Activity
+ [Activity(Label = AppNames.AppName, Theme = "@style/Kp2aTheme_BlueActionBar")]
+ public class SwitchImeActivity : AndroidX.AppCompat.App.AppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
@@ -24,7 +25,26 @@ namespace keepass2android
SetContentView(Resource.Layout.switch_ime_activity_layout);
FindViewById