Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set/call an new input method in Android

I followed these two exemples of developer.android (Creating an Input Method, Soft Keyboard sample). Think everything is correct, but the custom keyboard dont shows up.

Sorry but i dont understand the code, how i call this new keyboard?

thanks for all.

like image 856
user1279395 Avatar asked Dec 04 '22 17:12

user1279395


1 Answers

You can open the "Change input method" menu programatically like this:

InputMethodManager mgr = 
    (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if (mgr != null) {
    mgr.showInputMethodPicker();
}

You may also want to open "Language & Input settings" so your users can enable your input method. You can do that like this:

startActivityForResult(
    new Intent(android.provider.Settings.ACTION_INPUT_METHOD_SETTINGS), 0);
like image 122
Rubicon Avatar answered Dec 24 '22 04:12

Rubicon