Reputation: 118
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.
Upvotes: 4
Views: 4961
Reputation: 379
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);
Upvotes: 16
Reputation: 2843
You need to select the new keyboard to be your default. You have to turn it on in the device settings first, and then you need to long press inside of an EditText to be able to get the InputOptions menu. This will allow you to select your keyboard
Upvotes: 0