从物理键盘切换到软件键盘

Switch from physical to software keyboard(从物理键盘切换到软件键盘)
本文介绍了从物理键盘切换到软件键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

从物理键盘切换到软件键盘.大家好,我正在开发一个将在装有 Android 3.2 的平板电脑上运行的应用程序.我将物理键盘连接到平板电脑,然后软件键盘消失了.现在我需要在某些活动中使用软件键盘,但我不知道如何做到这一点.

Switch from physical to software keyboard. Hi all, I'm developing an application that will run on a tablet with Android 3.2. I attached a physical keyboard to tablet then the software keyboard disappear. Now I need to use the software keyboard in some activities, but I don't figure out how I can do that.

我尝试了不同的方法:

Android:自动显示软键盘焦点在 EditText

http://dev.bostone.us/2009/11/04/android-show-and-hide-soft-keyboard-programmaticaly/#awp::2009/11/04/android-show-and-hide-soft-keyboard-programmaticaly/

http://plainoldstan.blogspot.com/2010/09/android-set-focus-and-show-soft.html

如果连接了物理键盘,所有这些都不起作用.

All these don't work if the physical keyboard is connected.

有人知道我怎样才能实现这个目标吗?

Someone know how can I achieve this goal?

谢谢

推荐答案

设置下会有语言和输入法">>键盘设置>>输入法选择器">>始终显示"

Under setting ther will be "Language & Input" >> Keyboard Setting >> "Input method selector" >> "Always show"

插入键盘后,只需将键盘图标放在屏幕右下角",选择使用物理键盘"即可关闭

after you plug in the keyboard just put on the Keyboard ICON "on the bottom right of the screen" the select "USE PHYSICAL KEYBOARD" to off

然后软键盘(屏幕上)将正常显示,直到您拔下键盘.

Then the Soft keyboard (on screen) will appear normally until you unplug the keyboard.

在我的情况下,我使用条形码扫描仪而不是键盘,所以我确实需要一些软键盘,但是我使用 USB 集线器并连接条形码扫描仪和数字键盘.

In my case i use the barcode scanner instead of keyboard so I do need some softkeyboard however I use the USB hub and connect both barcode scanner and numeric keyboard.

希望这会对你有所帮助.

hope this will help you.

这篇关于从物理键盘切换到软件键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Android release APK crash with java.lang.AssertionError: impossible in java.lang.Enum(Android 发布 APK 因 java.lang.AssertionError 崩溃:在 java.lang.Enum 中不可能)
Finished with Non Zero Exit Value 3(以非零退出值 3 结束)
On gradle:3.0.0 More than one file was found with OS independent path #39;META-INF/ASL2.0#39;(在 gradle:3.0.0 上找到多个文件,其独立于操作系统的路径为“META-INF/ASL2.0)
Android : app loading library at runtime on Lollipop but not IceCreamSandwich(Android:运行时在 Lollipop 上而不是 IceCreamSandwich 上的应用程序加载库)
buildConfigField depending on flavor + buildType(buildConfigField 取决于风味 + buildType)
How do I suppress warnings when compiling an android library with gradle?(使用 gradle 编译 android 库时如何抑制警告?)