Dial pad to get phone number (with Android button images) - android

I want to get user input phone number, and my requirement is "on every button press my application analyze the input if length increased 10 digits than i want to enable 'Next' button".
I am planning to do it with a custom dialing pad that should look like android built-in dialing pad (image attached)...
can i use standard android dialing pad to achieve my requirement or should i develop my own dialing pad?

There is no "standard android dialing pad". Every phone ships their own dialer, which may or may not be the one google wrote. There is no dialing pad widget. You can ask for a numeric keyboard and force the keyboard to show, but it may have any format, and may not just be those 9 keys. If you want this, you're going to have to write it from scratch (or find a pre-existing library).

You can use KeyboardView. Design your own key layout in xml and put it anywhere on your layout. You can do whatever you want with it, like handle keypresses and change the key labels on run-time. Also, you need change input type of the editable field to something that won't trigger the OS (IME) keyboard, or else you will end up with both your custom keyboard as a view and the regular one.

String myBox =EditText.getText().toString();
if(myBox.length()<=9)
{
EditText.setOnEditorActionListener();
}
This may help you.

Related

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

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.

How to open Android keyboard show only custom digits in Android

I want to show digits "0123456789/" on keyboard if open on click of SearchViewbut I don't know how it can be done. I am able to set InputType to a searchview like this
searchView.setInputType(InputType.TYPE_CLASS_NUMBER);
but not able to set custom digit to show on a keyboard.
from input type InputType.TYPE_CLASS_NUMBER numeric keyboard is opening but i also want to show "/" also with numeric digits 0123456789.
I searched a lot on SO but didn't find any solution for this.
There is no easy solution for this. You have two options depending on what you can work with and what exactly you want.
If it is exactly as you say in your question, that is, to SHOW
just the Characters that you specify, then the way to go about doing
that would be to create a Custom SoftKeyboard. This will allow you
to take only the desired inputs and will show only those characters
that you have specified.
Otherwise you can disable taking other
characters input (that are not to be available), by working with
[onQueryTextChanged]1 where you manipulate to resend only the
values that you can take in as input. Here the default
softKeyboard is used, but the input taken in by the SearchView are
as per specification.
Note : my knowledge is mainly based on working with EditText rather than SearchView, so not able to provide exact codes for the above

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 make an edit text start out numeric but accept text also

In my application I have an EditText (Actually it's an implementation of MultiAutoCompleteTextView, but I don't think that matters) in which the user can enter a formula to be calculated, although generally they will want to just enter an integer.
What I would really like is for the keyboard to open with the numeric keyboard showing, but allow them to change to text if they want.
As standard of course it shows the letters and allwos them to change to numbers, which is OK, but 90% of the time they will want the numbers.
I tried doing:
operandEditText.setInputType(InputType.TYPE_CLASS_NUMBER|
InputType.TYPE_NUMBER_FLAG_SIGNED|InputType.TYPE_CLASS_TEXT);
But the result was a numeric keypad with letters written on the number keys (like a phone keypad), and it didn't write letters anyway.
I'm also aware that I could add a button, spinner or something that changed the input mode of the widget, but the aim of this is to make the interface easier to use, and I'm not sure adding another control will achieve that.
Is there a way to make it do what I want?

Categories

Resources