Input.getText show keyboard

7 views
Skip to first unread message

Andres Q

unread,
Jan 19, 2019, 8:57:46 AM1/19/19
to pl...@googlegroups.com
Hi,

Is it possible to make input.getText(...) to automatically show up the keyboard in Android? Currently if call that method it shows up the dialog but then the player needs to tap on the textfield for the keyboard to show up, can the (software) keyboard be made to automatically show alongside the dialog?

Thanks

Andrei Kleshchanka

unread,
Jan 22, 2019, 8:13:16 AM1/22/19
to PlayN
Easiest what you can do from your side - somehow override PlayN android platform .getText() code to manually show the keyboard.

Code to show keyboard looks like that:
 public void showKeyBoard(Context context, EditText editText) {
        InputMethodManager inputManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
        inputManager.showSoftInput(editText, 0);
 }

BTW, current implementation for android looks ugly and uses very old theme from Android 4 Kitkat. It will be nice to update it a bit, but.. I don't know if it possible for current maven-bases project.

Andres Q

unread,
Feb 11, 2019, 10:38:49 AM2/11/19
to pl...@googlegroups.com
Thanks, I'll try this.

I moved to gradle since it's much easier for Android builds, so maybe
there's a way to update that method. I'll keep you posted

El mar., 22 de ene. de 2019 a la(s) 10:13, Andrei Kleshchanka
(kles4enk...@gmail.com) escribió:
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "PlayN" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to playn+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages