From 82603b6058eb5c5a4bff80e3953c17ed0cdb56d8 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 15 Oct 2015 12:52:00 -0400 Subject: [PATCH] Fix some Android keyboards that didn't work properly. This conversation came from Joshua Granick on Twitter, starting here: https://twitter.com/singmajesty/status/653640543675641857 "We found an issue where certain Android keyboards (like the S6 with predictive text) wouldn't work ... Certain keyboards use a predictive text mode that does not dispatch a traditional onKey events, which is troublesome ... but telling the OS to use a "visible password" keyboard helps deal with this problem ... perhaps there's some other way (onKeyPreIme?) to do "textediting" events, but for now, this should be a fast fix ... I hear it affects the Galaxy Tab A 8.0", Galaxy S6, Asus ZenPhone 2, maybe others" --- android-project/src/org/libsdl/app/SDLActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 544d0c29b..424c8520a 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -1393,6 +1393,7 @@ class DummyEdit extends View implements View.OnKeyListener { public InputConnection onCreateInputConnection(EditorInfo outAttrs) { ic = new SDLInputConnection(this, true); + outAttrs.inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD; outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI | 33554432 /* API 11: EditorInfo.IME_FLAG_NO_FULLSCREEN */;