Skip to content

Commit

Permalink
Fix some Android keyboards that didn't work properly.
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
icculus committed Oct 15, 2015
1 parent ceb4312 commit 82603b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions android-project/src/org/libsdl/app/SDLActivity.java
Expand Up @@ -1393,6 +1393,7 @@ public boolean onKeyPreIme (int keyCode, KeyEvent event) {
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 */;

Expand Down

0 comments on commit 82603b6

Please sign in to comment.