Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
414 views
in Technique[技术] by (71.8m points)

android - Switch from physical to software keyboard

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.

I tried different ways:

Android: show soft keyboard automatically when focus is on an 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?

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...