I have a problem on my app in android. I added a code mobileSetKeyboardType "decimal" to show the decimal keyboard to input an amount. But it seems the Dot (".") button, does not work in phone. Works fine in tablet. I tried removing all pKey validations for the amount field but still the same. Anyone have experienced this one on real device? And how did you solve it?
By the way, I added the mobileSetKeyboardType "decimal" on preopencard
Note: I am using Livecode.
I'm posting this as an answer because that allows me to include a formatted script.
What happens if you put the following handler into the field script:
on rawKeyDown theKey
set the text of me to theKey
end rawKeyDown
Don't put this script anywhere else. It might make your stack unresponsive.
What language is your device using? If it is English US, what happens if you change it to English UK (or the reverse, or just change it to either option if you're using a different language)?
The real device keyboard can be a modified version of standard Android keyboard, so its behaviour may vary from device to device.
Related
I start my login activity and I use in Espresso test:
onView(withId(R.id.username)).perform(typeText("USERNAME"));
I expect the text in the field to be "USERNAME", but sometimes I get "SERNAME", others "UERNAME".
Most of the times it works but sometimes it fails, specially after rebooting the phone.
Here is the sample code to reproduce the bug:
https://github.com/neoranga55/CleanGUITestArchitecture
The test phone uses Swift keyboard with double language typing enabled. Apparently this causes the first appearance of the keyboard after phone boot to be slow but also auto-correct in a weird way the first letters of a word typed by Espresso.
Solution: always use default system keyboard on testing device/emulator and make sure a software keyboard is enabled to avoid this other issue.
You can also try replaceText(). It should not be affected by the slow IME:
onView(withId(R.id.username)).perform(replaceText("USERNAME"));
I'm using Masked Input plugin for jQuery (Version: 1.3.1) on my site.
Mask of the input is following:
$('#pan').mask('9999 9999 9999 9?999 999', {placeholder:" "});
This is for credit card pan so only digits and spaces are acceptable.
When android browser user taps on the input he needs to switch his keyboard to digital.
That's what he does.
But after entering a single digit keyboard switches back to "English letters".
I made an investigation and found out what couses this effect. It's this line in plugin:
input.val(buffer.join(''));
This plugin fully rewrites the value of an input on each button press.
Can anybody advise a solution of how to deal with this behavior? (i mean how to prevent keyboard from switching to default on input value rewrite)
P.S. Not all phones behave like this. And not all version of browser does.
My test "stand":
HUAWEI P2-6011 (android version 4.1.2)
P.P.S. Please don't suggest becouse it works for digits only, but i need spaces too. If i switch pattern to something like '^[0-9 ]+$' - problem is not solved.
This is a question re the android SIP (that's what we call it on WP7). Please see the clip at https://dl.dropbox.com/u/39662979/AndroidEmulator.png.
This is a demo app in the commonsware book on android development. It displays textboxes for longitude and latitude and shows a keyboard allowing the digits 0 - 9. * and # to be entered. Of course longitude often requires a negative number but how does one type the minus sign?? I've tried all of the other keys - I'm able to bring up other character sets but no minus sign.
The book shows a minus sign being entered but eluding me.
thanks,
Dean
Had a similar issue on my Galaxy S3:
The numeric keypad of the stock Samsung keyboard shows the digits 0 thru 9 plus one more key with a period and a minus sign combined: .-
Took me quite a while to find that the minus sign requires a double tap, not a long press.
It may be that your keyboard doesn't have the "-" due to your language setting. I'd recommend adding another keyboard (probably the US keyboard) via device Settings and switching to the US keyboard while you're testing.
That means the program is not working correctly
If you run the application on a device or emulator that is configured for English, there is a key, marked with what in English is referred to as a "minus sign" (upper-right button on keypad), that can negate the number typed into the EditText:
You will notice that, in your screenshot, the keyboard is different:
In part, this is because your emulator is not configured for English. It is configured for some other language. You can tell this because some of the keys have Chinese, Japanese, or some similar character set on them.
I do not know precisely what language your device or emulator is configured for. I do not know if one of those keys either is a negation, or leads to a secondary keyboard that offers negation. My guess is that the key in the lower left corner would switch to alternate keysets, but that is just a guess.
My recommendation would be for you to configure your emulator to be for a language that you speak. Then, perhaps the keyboard will be more intelligible to you.
I just took a look on different devices and their soft keyboards. They are all looking a bit different. I attach two screenshots. One is from my HTC Desire (Android 2.2), another one from Emulator (Android 2.3).
As you can see on the device the enter key is on device just a symbol, on emulator it is "send".
Can I change it somehow?
I had this problem a year ago, my problem was that the numeric keypad is very different from each provider (not only on style but on the buttons that are shown)
In my personal experience is a pain to try to change that, you would need to create your own SoftKeyboard class with your own images.
If it's not an important issue I recommend to just pass over it, or find a keyboard type that satisfies your needs.
However, I don't know if in the newest versions of Android you get an easier way to customize keyboards.
Good luck on there :)
When I run a program on my android emulator most of the keys are in English. However, on both lower corners there are buttons that look like they are from an Asian language. Also, I am using textAutoCorect, but only Asian characters pop up instead of English words. I know it is not my code, so how would I go about fixing this?
Is this happening when you type into a textedit or something? if so then you want to long click onto the textedit and then select input method and then android keyboard.