如何编程方式切换到默认softkeyboard [英] How programmatically switch to default softkeyboard
本文介绍了如何编程方式切换到默认softkeyboard的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有我的设备上有多个键盘,我如何通过编程不同的键盘之间切换?
I have multiple keyboards on my device, how can I switch between the different keyboards programmatically?
(我不想简单地打开或关闭软键盘,如下所示:
机器人 - 显示软键盘上的需求。我需要切换到默认的键盘。)
(I don't want to simply open or close the soft keyboard as in: android - show soft keyboard on demand. I need to switch to the default keyboard.)
编辑:加code
如果我尝试低于code,I切换到当前的键盘:
If i try below code, i switch to current keyboard:
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput( 0, 0);
但我需要切换到默认的键盘。
But i need switch to default keyboard.
请给我任何想法切换到默认的键盘?
Please get me any idea to switch to default keyboard?
推荐答案
如果你想显示在的EditText
默认情况下,键盘,这里是如何,您可以:
If you want to display the keyboard on edittext
by default, here is how you can:
yourEditText.requestFocus();
这篇关于如何编程方式切换到默认softkeyboard的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文