Shift Keyboard from Alpha to Numeric - android

I have a Zebra TC8300 scanner that has an enterprise keyboard. On initial show of the keyboard it shows Alpha keys. User has to slide the keyboard to get to the numeric keypad. I have an Autocomplete text box on a dialog. It has a threshold of 2. The cycle is, Once the threshold is reached, I dismiss the keyboard, call a backend API, display the results in the dropdown, set the threshold to the current length of the text box and then display the keyboard. Dismissing the keyboard is done so the user does not continue entering until the results of the API are returned. The 'issue' is the user is complaining that, if he is entering numbers, once the cycle completes, they see Alpha keys. They want the keypad to stay on the numeric so they can continue entering digits until they desire to enter alpha. Crazy, but that's what they want. I can't set the inputtype because that removes the option of going back to alpha keys once you set numeric. Any Ideas?

Related

Hiding android soft keyboard interrupts value assigning

I made a small app that should visualize a priority queue by using a heap structure(Kotlin, Android Studio API23).
It has an array that displays numbers, a grid view where elements are shown or hidden, an edittext as input field, an enqueue, dequeue and help button.
Everything works find, BUT:
If I want to enqueue a number I have to click on the edittext field, this automatically opens the soft keyboard. I can confirm by clicking on soft keyboard's enter or on UI's enqueue button, confirming automatically closes the keyboard- everything fine.
But if I select the edittext, enter a number and close the keyboard manually with it's button and then want to confirm with the enqueue button in UI, the tree and array are not showing the new number instead showing the previous entered number. Then clicking on edittext the keyboard shows again and without entering anything the numbers are getting updated. This only happens to numbers where an action have to take place.
(To be mentioned: tree works with max-heap, numbers getting enqueued on last place if parents are smaller children are swapped so always the largest number is on top as root
I want to know how I can fix that if I made an input, then close the keyboard manually and confirm with enqueue button, the numbers immediately are getting updated.
Thanks, see the picture for further understanding by link.

soft Keyboard automatically changes from numeric to alphanumeric in Android 7

I have an edittext in my application that gets only numeric keys. It worked fine with a filter for the keys that the user enters and with numeric keyboard shows up when the user touches the edittext box.
when I installed the app on android 7 device, the numeric keyboard shows up and after few seconds, it is hidden and an alphanumeric keyboard replaced it.
I need only numeric one!!
I assume that I need to "listen" to keyboard event and when I got any change in the keyboard type, I should act to change it back.
Anyone to tell me how to do it??!!
In your xml file give below property to your edit text
android:inputType="number"

Show numeric keyboard first when input type is "text"

I would like to display Numberic keyboard to the user first even though my AutoCompleteTextView's input type is text.
I read this How do I default to numeric keyboard on EditText without forcing numeric input? question and tried to fix it. But it is only showing numeric keyboard. It won't allow me to input Text.
I would like to show first "numberic" input but also allow to enter "text" to AutoCompleteTextView. Any solution?
Edit
I am using Galaxy Tab 2 with 4.0.4 OS Version
When screen launch, following keyboard appears.
But I want to switch keyboard to "numeric" input (which appears when we press "123" button)

Replace Go button on soft keyboard with Next in Phonegap

Phonegap input type text show Go button on soft keyboard, I have multiple text boxes so want Next button on keyboard so user can move easily and on last input want Go so user can press to submit form.
And on Android kitkatt keyboard top bar also not displaying Next|Prev buttons.
Having a "Next" button instead of "Go" for input type="text" would not be possible with Android as of now.
Android will always display "Go" button for form input fields irrespective of the position of the field you are at in the form. "Go" is basically reflecting the same behavior as of an "Enter" button on a normal browser & keyboard.
There are two possible hacks to come closer to what you need (still won't change "Go" to "Next" but will help "Go" act as "Next") -
Hack 1 - Hijack Enter key event & move focus to next fields
Like I mentioned the "Go" key replicates the "Enter" key, you can capture the enter key event using JavaScript & make it move focus to next fields in form until its your last field. Once last field reaches you can allow it to act as enter. So basically Go will keep moving focus to next fields until its your last field & then will submit the form.
I have answered a solution to a similar requirement here - How to trigger a Tab when user presses Enter, you can try implementing the same in your app.
DEMO LINK - http://codepen.io/nitishdhar/pen/Gxbhm
Hack 2 - Force form validation & move focus to next invalid fields
If you want to prevent users from submitting the form, you can put required validations on the form using java-script & if some field is not filled, upon pressing "Go" the focus of the cursor can be brought to the next "not filled" field. So in a way giving the impression of - "Pressing Go & moving to next field to be filled"
Try this plugin - http://jqueryvalidation.org/ this behaves in the way explained i.e moves focus to the next required or invalid field.
Also I think some android versions show some tab key on the keyboard to move between fields, buts its not Next.
All the best.

How to detect user is touching the soft keyboard?

I want to determine the duration of user taps or swipes on the keyboard so that I can determine how long words/letters take a person to input using the soft keyboard.
Is there a way to detect only that the user has touched the keyboard (I don't care about what they are entering at this point)? I am using a TextWatcher to get the end of the tap/swipe, but I have not had any success getting the beginning of the tap/switch when the user first touches the keyboard.
Is there a way to detect only that the user has touched the keyboard
Write your own input method editor (a.k.a., soft keyboard) that contains your desired time recording. Then, convince users to switch to use your input method editor.
I am using a TextWatcher to get the end of the tap/swipe
No, you are using a TextWatcher to detect changes to text in an EditText. Such changes may be from a user interacting with an input method editor. Or, they may be from the user using a physical keyboard. Or, they may be from action mode operations like cut and paste.

Categories

Resources