Trigger onFocus textBox Android gwt webapp phonegap 1.1 - android

I'm running a webapp on Android galaxytab.
I have 3 textbox with FocusHandler-s erasing the textbox content onFocus.
This works well but if the user uses the tab, previous or next buttons on the device's keyboard, the FocusEvent is not triggered.
I tried to catch Key events to prevent default action on TAB but the tab key is not triggerd either.
Does anyone know how to trigger a FocusEvent on tab or previous/next key press on an Android device keyboard? (Everything works well in computer's browser even if using tab key the focus event is triggered but not in Android's browser).

While this isn't a fix for your FocusHandler issue, if the content in the textbox that is being erased is a placeholder, perhaps you can benefit from this answer.

Take a look at http://www.m-gwt.com
The library provides placeholders for input elements in gwt.

Related

Page refreshes on input form field Touch Events - Android, Samsung

Hey guys I am trying to trouble shoot an issue that seems to be only happening on certain Android devices that are version 5 or older.
What happens is, when I touch an input field say email-address or password to login, the page refreshes which makes it impossible to ever enter any information.
This is not just limited to those fields, but any form fields in the application. We have a leave feedback page and that form field also refreshes the page.
I had assumed I was having the same issue as Disabling android's chrome pull-down-to-refresh feature
But none of those solutions seem to be working for me and I just can't figure out what exactly is happening.
The information on my Android device:
Samsung Galaxy Tab A
Version 5.0.2
Is happening on Firefox, and Chrome on the device.
I am a little new to debugging on Android and could not find the version of touch my device is using.
We are using Jquery mobile for the front-end and some bootstrap javascript/css for forms.
So what I found out, was that whenever the screen resizes we do a refresh event for the new screen size.
What was happening on Android is that we had a css property `
orientation: landscape
on landscape mode. Well what was happening is you would click the form field on Android the keyboard fires and resizes the screen. Which was triggering a refresh, which took the keyboard away and sized the screen back to the regular screen with no keyboard event.
How we fixed this was using:
min-aspect-ratio: 13/9
This however was not happening on iOS because as far as I can tell, iOS just triggers a scroll-bar event instead of a screen resize event when the keyboard opens.

Simulate the winKey press event in android

I'm using a bluetooth keyboard with an android tablet and i've found that there's some shortcut avaible from a qwerty keyboard. I want to generate some of them from the code. I'm able to trigger the majority of all the key combination but I'm not able to trigger a winKey (The windows logo key on a qwerty). I've basically try every KEY CODE from android and non of them want to work.
If any one as a little hint on that subject that would be appreciated.

Android: Navigation using Tab key doesn't work properly on input boxes

For large size screens, the default android keyboard automatically displays Tab keys. I have a phonegap application which contains several input boxes on one page. When I try to navigate between input boxes using tab key on soft-keyboard, nothing happens.
I also tried to open gmail login page on browser and Tab key didn't shift focus there as well. However, I noticed that only in case of input boxes, I had to use shift+tab key to navigate to next input box. For navigating between other elements, just pressing tab key was sufficient. Is this the specific behavior implemented by android & is there any particular reason for it? I am using nexus 10 but found same behavior on emulator too.
I think this is a problem with Nexus 10 in particular, as I observe the same thing and here is another user that reports the same (https://stackoverflow.com/questions/16651669/nexus-10-keyboard-tab-key-not-working).
Tab key does work on native Android apps as it is supposed to, but not on hybrid apps which are basically wrapped in WebView. I think this is an oversight from the Android team. You can always install a Swipe or Hackers keyboard from the Play Store where the Tab key does the job.
This seems to be an issue specific to Android Tablet devices. A workaround I found was to change the keyboard mode to either split or floating. Also I noticed flipping the device around to landscape view allows the input elements to behave correctly.
The original issue is related to the viewport size change that happens when any input receives focus which is caused by this so-called soft keyboard. Android seems to handle the rendering of a soft keyboard differently from other manufacturers.

Android: How to intercept keydown globally (on hardware keyboard)

Is there a possibility for an android app to run as a service in the background, intercept keydown events from the hardware keyboard and change behavior (i.e. the resulting character) in some special cases?
The idea in mind is to have sort of a keyboard layout fix, mainly making important special characters available using an alternative keymap instead of having to select from a huge grid on the touch screen. Sometimes, the default keymap of a mobile devices do not represent all important characters, even more when it comes to non-english languages.
Thanks for inspiration :)
Peter
EDIT: additionally emphasized hardware
What you are describing is in fact not a service in background but replacing the keyboard app itself..take a look at the SWype app.
You do not have to create a service to do this as you want just the your own keyboard layout coming up when entering text, etc.
The sample of replacing a default app in the sdk is the homescreen but the keyboard app can be replaced as well..

How can I switch to the Android keyboard "SMS" mode

The default Messaging app in Android (tested against version 2.1) appears to put the soft keyboard in a special mode, where the return key is replaced with an "emoticon key". When you press it you get a selection of emoticons to insert into your message.
(source: futurenet.com)
How do I instruct the soft keyboard to appear in this mode in my app?
This is definitely an imeOption being set immediately on EditText. I don't know exactly which one it is, it doesn't seem to match any of the ones described here. You might be able to use Hierarchy Viewer to help you pin down what the exact options are.

Categories

Resources