How to set / call a new input method in Android

I followed these two examples of the .android developer (Creating an input method, sample soft keyboard). Think that everything is correct, but the user keyboard does not appear.

Sorry, but I do not understand the code, what do I call this new keyboard?

thanks for everyone.

+4
source share
2 answers

You can programmatically change the "Change input method" menu as follows:

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

You can also open the "Language and input settings" so that your users can enable your input method. You can do it like this:

 startActivityForResult( new Intent(android.provider.Settings.ACTION_INPUT_METHOD_SETTINGS), 0); 
+14
source

You need to choose a new keyboard, which will be used by default. First you need to enable it in the device settings, and then you need to long press inside the EditText to get the InputOptions menu. This will let you choose your keyboard.

0
source

Source: https://habr.com/ru/post/1402310/


All Articles