How to show keyboard with numbers and symbols by default - ionic - android

How to show keyboard like this by default on android ionic5 app?
I've tried type="number" but it only allows to input numbers. On ios it shows full keyboard with this type.
By default, I mean to show it immediately after user clicks on the input

You need to use inputmode and not type as per the documentation.

Try this type of input, it works for me
<ion-input type="text"></ion-input>

No, you can't. In face, you can't even be sure the keyboard has a screen like that on Android. On Android, the keyboard is a separate app, and not all OEMs use the same one (and the user can also switch it out themselves). You can set the input type as a hint for what it should display- but it can ignore that hint. And the hints are very generic- text, email, number, password, things like that. There's no hint that says "symbols screen" and not every keyboard has a screen line that. And I don't know of any hint that commonly maps to that either.

Related

Android: Pull out emoji keyboard on button press

I know that you can specify a short message input type in order to turn the enter key of the keyboard into an emoji button and pressing it will show up the emoji list but what i want to do is open up the emoji list programatically from a button. Is this possible?
There is no functionality to add tabs to any generic keyboard. Certain keyboards may support it, but it isn't a common feature. You could write your own fully custom keyboard, but that's a lot of work and will piss off many users.
Also, I'm not sure what you mean about by like in hangouts. I use hangouts- it doesn't do anything odd with my keyboard. It stays as Swype, there's no special emoji tab. It may be a feature of your favorite keyboard based on the input type (I assume both use input type textShortMessage). But it isn't a generic feature.
See Link Android Keyboard with Emoji
Thanks and enjoy...

Android - Set EditText keyboard input type to symbols and numbers ("?123")

I have an editText and I want to make the number and symbols pad (the "?123") as the default input type since the user will mostly input numbers, slashes, and the percent sign.
I've look around the questions here, but those mostly show the number pad instead. I've tried the solution to this problem editText.setRawInputType(Configuration.KEYBOARD_QWERTY); but it shows the number pad on android 4.4.4.
Now I'm stuck because the input types in the xml do not seem to show the ?123 pad. I was thinking of doing it programatically instead but that seems to be a dead end as well.
Any ideas anyone?
There is no way to do that. All you can do is give it the input type. The keyboard itself will decide what to display based on the EditorInfo (which holds the input type and a few other pieces of information) and it will differ for each keyboard- remember that not all phones will use the default keyboard, and some OEMs (Samsung) have their own they replace the default with). Your only real option is to send a numeric inputType, and hope it displays what you want.
Try InputType instead of Configuration. Check this out.

How to remove calculator buttons from numeric keypad

The input type for my EditText control is set to "number." When the numeric keypad is displayed, besides showing the numbers, it also shows calculator keys (+/-/etc.). I am wondering if there is any setting to remove the calculator keys.
Thank you in advance for your help.
If all you need are actual numbers 0-9 you could set your keyboard type to "phone" instead of "number" which should give you a more 9-pad style keyboard that probably won't contain the extra keys like +, - etc...
However in the end it is up the currently running keyboard application (which is chosen by the user) If whatever keyboard they happen to be using shows keys that you would rather it not, there is generally no way for you to instruct it not to show those keys.
If you want to have complete control over the input then you'll have to create your own View that mimics the functionality of the keyboard and "manually" insert the typed characters into your EditText.
Add this line of code
input.setInputType(InputType.TYPE_CLASS_NUMBER);
Hope it helps.

Android Keyboard Type

Is it possible to have this keyboard in android when user tap on an edit text?
This keyboard needs to come up first. I used different input type however I didnt get the one that I attached.
Can someone please advice?
Is it possible to force that specific type of keyboard? No. You can't even force the keyboard to exist. The user chooses a keyboard program, such as the default Android keyboard, Swype, SwiftKey, etc. You can specify an input type like URL, numeric, text, password, etc. The keyboard the user selected will then choose what keyboard to display by default, based on its own logic, the input type, and any user settings. There is no way to force anything to a specific type of keyboard, although most of them will see numeric and switch to a keypad or numeric style keyboard.
A way to do it could be assigning a pattern to the input, like <input type="text" pattern="\d*"/> However this will also force only numbers entered.
One way to avoid the pattern being enforced is to avoid validation, so your input can look like this <input type="text" pattern="\d*" novalidate="true" />

HTML5 inputs on the Android browser

iPhone's Mobile Safari seems to recognize most new HTML5 input types, in particular the ones detailed here, such that tapping in an input declared like so:
<input type="number" id="myInput" value=""/>
presents the iPhone's numeric keypad.
However, in the Android browser, the usual text keypad is shown when tapping the same input.
Is there a workaround for the Android browser or an alternative attribute that can be set or even a library I can include to have the android browser respect this setting?
if you specify on the input element the type as "number" it will automatically open with the numeric keypad
example
<input type="number" pattern="[0-9]*" name="amount_zip" value="loading.."></input>
the pattern attribute is for iPhone,
you can also get more info on inputs here
I just tried <input type="number"> with a Xoom (Honecomb, I think) and it does cause the numeric keypad to open, which is great, but the field only appears to allow positive integers. Hitting the '-' and '.' keys on the keypad have no effect. Adding relevant min / max attributes or setting a proper pattern don't seem to have any effect. In other words, if you want the keyboard to appear and your numeric field only needs to be zero or a positive integer, this will work. Otherwise (floats, negative numbers), you'll have to use text.
(I realize I'm not answering the question here, I would like to have left this as a comment for the previous answer, but can't figure out how)

Categories

Resources