编程切换Android键盘简介键盘、简介、Android

2023-09-04 09:59:05 作者:领间漏光

有没有什么办法,我们可以通过编程开关安装的键盘(不用去设置部分)?

Is there any way that we can switch installed keyboards programmatically (without going to the settings section)?

我的要求是,用户psented所有已安装在手机上,并得到一个选择的键盘切换到选定的(基本上我们要削减步骤将他转移到设置页面一$ P $ )。

My requirement is that the user is presented with all the keyboards that is installed on the phone and gets a choice to switch to the one selected (basically we want to cut down the step to transfer him to the settings page).

任何帮助是AP preciated。

Any help is appreciated.

THX

推荐答案

这一块code将满足您的要求:

This piece of code will fulfill your requirements:

InputMethodManager imeManager = (InputMethodManager) getApplicationContext().getSystemService(INPUT_METHOD_SERVICE);
imeManager.showInputMethodPicker();

正如Commonsware指出,在他的回答,就没有办法做到这一点后面使用者的背部。

As Commonsware points out in his answer, there is no way to do this behind the user's back.