I'm working on an android Toshiba TV application. There is a EditBox. When I move cursor there, the soft keyboard is not shown until I press OK. However the focus is never moved to the soft keyboard so that I can't select any letter on it. My same application works on other TV. Any idea? Thanks
Related
In my application there is a search segment -- just like on the twitter app. When the user clicks the magnifying glass the search segment starts (a fragment) and the keyboard is suppose to pop up so the user can type the query into the search bar.
What actually happens is the cursor is blinking in the search bar, and I can type into the bar with the hard keyboard, but the soft keyboard doesn't pop up. If I click the search bar, then the soft keyboard pops up.
Any ideas why the soft keyboard isn't popping up when the cursor is blinking in the search bar?
Apparently the soft keyboard isn't enabled by default on Genymotion.
I've turned on the soft keyboard by going to Settings | Language & Input | Current Keyboard and turning on the Show Input Method switch. But I have had some difficulty with this.
Different API versions have different UIs for this setting and it's never quite clear how to get the soft keys to show. Sometimes I've set the soft keys to show and they still don't show. Maybe you have to set them then restart Android on the device.
But that's where the setting is, and if your experience is anything like mine, you'll get it soft keys to show after you jank around with it for awhile.
You must enable it from the Genymotion application:
Open Genymotion app, it will display the list of your Genymotion devices
On the device you want to use the virtual keyboard click on the setting icon
Then check the option "Use virtual keyboard for text input"
You will then have a virtual keyboard poping up when you click on an edit text.
This will work whatever the Android version of your device is.
I'm writing a GWT-Web app. Now we are testing this web app on our Android Tablet.
Android 4.2.2
Browser: Chrome 37.0.2062.117
And here is the problem, if we klick into a textbox the keyboard open as expected. But after typing in one or two letters the keyboard hides automaticly.
Then you have to change the text box to get the Keyboard shown again.
Does any one have an idea why this happen ?
Thanks
Dominic
Virtual keyboard doesn't usually hide itself if window receives input focus, but try adding this to your code just to make sure.
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
For the life of me I can't seem to figure this out but when you use a in the application, it shows the numeric keyboard.
The soft keyboard will appear but when you hit the Next key it does nothing. I can make the keyboard show and hide but I can't get an event listener to pickup the Next Key. Any ideas?
I would comment, but I don't have enough points.
This appears to be a bug in Chrome/Native Android browser. See Android Soft keyboard: Next button not "tabbing" between HTML5 number inputs
I'm not sure if it is possible to detect the Next button press in Phonegap. Would be interested to know..
I'm using the Android emulator to test my first Android application. While there is a functioning hard keyboard at the right side of the emulator window, the soft keyboard shows up when editing in an EditText control.
I'm aware of the option to hide the soft keyboard by using an instance of InputMethodManager, however I'm wondering why the soft keyboard does appear at all (when the hard keyboard is available).
To me, as a user, the soft keyboard in this case is rather distracting, hence I'd like to get rid of it if useful. - This question is about the practical context (i.e., is there any use of the soft keyboard when there is a hard keyboard, do real-world devices behave similarly to the emulator) and about general strategies to address the issue.
Thanks. I'll be upvoting any helpful hints.
On my G1, when the hard keyboard was opened, the soft keyboard didn't appear. But I'm not sure whether a device which ALWAYS has a keyboard opened (like the Samsung Galaxy PRO if I'm not mistaken) does the same.
Since the emulator doesn't have a slide keyboard, I think that's the case for this behavior.
With a touch screen device + hard keyboard you have the flexibility to use both. On most devices with hard keyboards the keyboard has to be dragged out. It's much easier to just tap the screen. If you want to type a lot you would take the trouble to slide the keyboard out.
Android gives you the flexibility to program for all these behaviors.
Actually, the AVD emulator does have a slide-out keyboard.
The AVD option "Keyboard support" indicates whether the emulated device has any form of physical keyboard. The option "Keyboard lid support" indicates whether the device has a keyboard that can be opened or closed (slid out or what have you).
As far as actually "opening" and "closing" the keyboard on a device set up with these options,
you need to switch the orientation which is generally what you do with real-world slide-out-keyboard phones, e.g. the original Droid:
Original Droid with slide-out keyboard open
In the emulator, you control this orientation change with Ctrl+F11/Ctrl+F12 or 7/9 (on the number pad only, with NumLk off).
You can confirm the keyboard opening and closing states by checking the value getResources().getConfiguration().hardKeyboardHidden == config.HARDKEYBOARDHIDDEN_YES
As far as whether the soft keyboard appears or not, it appears to me that handling such things is up to you as the programmer. Here's an example you can try in AVD:
Set up an emulator with "Keyboard support" and "Keyboard lid support" both set to yes.
Launch the emulator, then open Android's built in Messaging app.
Click in one of the text boxes - the soft keyboard should show up.
Switch the orientation of the emulator with Ctrl+F12 - the soft keyboard should now disappear
Note there seems to be a problem with the emulator itself, that switching back to portrait mode doesn't cause apps to redraw themselves back to portrait layout. but they will switch back to closed keyboard mode, which yields some odd, sideways-y behavior.
For an example of code to catch the keyboard opening/closing events, check out: http://www.how-to-develop-android-apps.com/how-to-detect-screen-orientation-change-in-android/
After testing on real world devices; On the motorola milestone that has a sliding keyboard that if it's open the soft keyboard is not shown, but when it's closed the soft keyboard is shown. On the HTC Cha-Cha, that has a permanently shown keyboard, the phone always uses the hardware keyboard. Even when in landscape and the hard keyboard would be very difficult to use it doesn't show a soft keyboard (Even after installing a soft keyboard I was unable to select it for use under Keyboard & Language Settings).
For additional information about the phone you can use the following.They will return the keyboard type and whether or not it is a hard keyboard and shown. Note: Phones without a hard keyboard that I've tested report that hardKeyboardHidden=2; (Which indicates hidden=yes), but type reports as soft keyboard which makes sense.
Configuration config = getContext().getResources().getConfiguration();
int keyboardHidden=config.hardKeyboardHidden;
int keyboard=config.keyboard;
http://developer.android.com/reference/android/content/res/Configuration.html#HARDKEYBOARDHIDDEN_NO
I am developing an Android application. What I find most annoying during testing is, that the emulator always pops up that on-screen telephone keyboard whenever I click into a text input field. Since I input my data with the keyboard anyway I find that most annoying. Can one switch that on-screen keyboard appearance off? Or can one change that so that it at least presents a mini-qwerty keyboard as my actual device does, not that old-fashioned T9 keyboard?
Michael
You can disable the virtual keyboard in Settings->Language.
If you change orientation of the emulator it won't popup (KEYPAD_7, Ctrl-F11).
If you use cursor keys instead of clicking the fields, probably won't popup either.
Whatever you do, keep in mind that in actual devices it usually pops up anyway.