Android mobile phone numbers are displayed first

I have a login screen to my application that accepts CPF as a login (CPF is a unique identifier of a number that every Brazilian has, for example: 10546819546), but it can also accept passport numbers as a login, and it can have letters on him.

My problem is that I want the keyboard, when it pops up, to display the number / characters "view" in front of the default alphabet. Changing the input method to the phone or number does not solve my problem, because, as I said, the login may contain letters.

I saw some explanations for questions somewhat similar to mine, but all of them either did not solve my problem or were too complicated.

This is just a small adjustment to slightly improve the user interface and entertain me when developing the application, so if it's something like โ€œoverride the default keyboard, create a custom componentโ€, etc., I will just leave it alone.

TL DR: I want to show the soft keyboard number / character in front of the letters.

+4
source share
1 answer

Unfortunately, when it comes to the soft keyboard, you are at the mercy of the fate of the one who made the one on which the user installed his device. Many devices come preloaded and default for swype keyboards. But many others have soft keyboards made by the manufacturer of this device. It depends on who created it to decide how the keyboard responds to android:inputType , which you pass to it. Perhaps some of them right now have the behavior you are looking for when you install them on a number or phone. I just checked it on my friend and found that it is the same as your number and the phone does not give letters.

+1
source

Source: https://habr.com/ru/post/1380861/


All Articles