更改Android设备编程机器人输入法 [英] Change Input method of android device programatically android

查看:185
本文介绍了更改Android设备编程机器人输入法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在开发Android的一个小小的应用程序,它由一个编辑文本和放大器;按钮。按钮将可见编辑文本不blank.Since我有LG最优解的Andr​​oid设备只有经过,每当我点击编辑文本,因为它它LG的设备,LG键盘会出现,但我不希望这样的键盘,我想安卓键盘使用。我也知道,我可以进入设置=>语言和放大器;键盘和放大器;我可以改变键盘。但我不想用,我想它应该做的,只有通过编码。

I am developing one small application in android which consist of an Edit Text & Button. Button will be visible only after edit text is not blank.Since I am having LG Optimums Android device, Whenever i click on Edit Text since it it LG device, LG Key Board will appear but i don't want that Key Board i want Android Key Board to use. I Also know that i can go into Setting=>Language & Key Board & i can change that Key Board. But i don't want to use that i want it should be done only through coding.

感谢名单的任何帮助......

Thanx for any Help.....

推荐答案

这是不可能以编程方式更改键盘设置的用户。你能做的唯一一件事就是建议用户去改变它,帮助它这样做。例如,这将显示一个对话框,他们改变键盘:

It's not possible to change the keyboard settings for the user programmatically. The only thing you can do is advise the user to change it and help it to do so. For instance, this will show a dialog for them to change keyboard:

private void showInputMethodPicker() {
        InputMethodManager imeManager = (InputMethodManager) getApplicationContext().getSystemService(INPUT_METHOD_SERVICE); 
        if (imeManager != null) {
            imeManager.showInputMethodPicker();
        } else {
            Toast.makeText(this, R.string.not_possible_im_picker, Toast.LENGTH_LONG).show();
        }
    }

这篇关于更改Android设备编程机器人输入法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆