Android have button on keyboard that switches custom keyboard to user specified default keyboard -
i have custom keyboard in android. want have button on keyboard when pressed hide keyboard , show keyboard user has specified default keyboard. (if worst comes worst, accept solution shows default android keyboard not specified user).
i tried code:
private void showsoftkeyboard() { inputmethodmanager imm = (inputmethodmanager) getsystemservice(context.input_method_service); imm.togglesoftinput(inputmethodmanager.show_forced,inputmethodmanager.hide_implicit_only); }
but did nothing.
what should do?
edit one:
i documenting progress in figuring out.
so far have figured out how default user set keyboard:
string currentkeyboard = settings.secure.getstring(getcontentresolver(), settings.secure.default_input_method);
based off of post: how detect if user's keyboard swype?
i believe there method in inputmethodmanager
class allows set inputmethod. believe true due post: android: switch different ime programmatically
now have figure out how figure out how id of default keyboard , can implement feature.
Comments
Post a Comment