I've tried a lot of InputFilter combinations to no avail.
The numbers I'm referring to are these in the first row:
I need this for an EditText that will receive a person's name. I already managed to disable the word suggestions with InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD, however this enabled the first row displayed in the image above.
There are dozens, if not hundreds, of input method editors (soft keyboards) pre-installed on Android devices. There are many more available for users to download and install, from app distribution channels like the Play Store.
You, as the app developer, do not have absolute control over them. At best, you provide some hints as to your desired behavior, such as what you are doing with TYPE_TEXT_VARIATION_VISIBLE_PASSWORD.
However:
There is no requirement for any input method editor to disable word suggestions because you requested TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
There is no option to say "please do not show that row of numbers", and even if there were, there is no requirement for any input method editor to honor that request
I cannot rule out the possibility that there is some option that happens to remove those numbers on the one device that you are testing on. Just don't expect any of this to work for all devices and all users.
Related
I want a app that can read text on my screen and click on the text which I can pre-define in the app. App mostly capable to identify multiple texts and if anyone of them present on screen then click on that region.
Yes.
Macrodroid.
Use the Device action -> UI interaction -> Click -> Specific text
Option in the macro and it'll click that word on the screen
👍🏻
You can't. Android doesn't have APIs for screen scraping because its a huge security hole- you could use it to grab passwords, banking info, etc. Definitely not possible without a rooted device, probably not possible even with root without a lot of work (you could maybe on a rooted device grab it right from the screen data, but then you'd have to do image processing to find the actual text).
I'm trying to make an a soft keyboard which an EditText presents have a layout of a phone keyboard but also with a "." and "#" signs.
What I tried was this on the edit text:
android:inputType="textEmailAddress|phone"
android:digits="0123456789.#"
I'm seeing the keyboard like I want as a phone layout in general and with the "." symbol but without the "#" symbol.. how can I add it to the keyboard?
I'm trying to make an a soft keyboard which an EditText presents have a layout of a phone keyboard but also with a "." and "#" signs.
There is nothing in the specifications that supports this.
android:inputType="textEmailAddress|phone"
Quoting the documentation for android:inputType: "Generally you can select a single value, though some can be combined together as indicated." The docs do not suggest that textEmailAddress can be combined with phone.
android:digits="0123456789.#"
This stipulates what characters are allowed. I am not aware that an InputMethod even finds out about this attribute; one certainly does not have to somehow magically adjust its keyboard layout to accommodate it.
how can I add it to the keyboard?
You don't, except perhaps by writing your own InputMethod, then forcing people at gunpoint to use it.
Please understand that there are over 8,000 Android device models. Dozens, if not hundreds, of input methods will be shipped on these devices, and others can be installed by users separately. These are written by independent developers. There is no requirement for any of them to even have keys, as evidenced by Graffiti Pro. And they certainly do not have to handle some arbitrary set of keys that an app developer wants.
android:inputType gives you a chance to supply a hint to the input method for how it should optimize the layout for the user. android:inputType specifically limits things to a few classes to keep things sane for the developers of the input methods. Furthermore, android:inputType is a hint, not a demand; as Graffiti Pro illustrates, not all input methods will necessarily change based upon android:inputType, at least for all possible types.
I want to make an application to automatically change my mobile keyboard according to application. My mobile default keyboard will change according to application, such as:
I want to use "Ridmik Keyboard" with Facebook or want to use "Swift keyboard" with Google play. Is it possible ?
I'm pretty sure that it's not possible. The only way you can change the keyboard is by asking the user to do so from the device's settings. Automatically changing the keyboard would be a major security hole, as a malicious keyboard could track passwords, for example.
Alternatively, you could ask the user to select a keyboard by calling startActivity(new Intent(android.provider.Settings.ACTION_INPUT_METHOD_SETTINGS));, and you can detect when a certain application is launched by sniffing into the LogCat.
If you are willing to root your device there are at least two solutions in the Google Play store that claim to do what you want: Keyboard Manager and Keyboard Master.
For non-rooted devices, there is Keyboard Manager Plus - however you should be aware that it flashes the keyboard picker on the screen as it automatically changes the keyboard. If you can live with that, that's a possible solution for you without rooting.
Caveat: I have not tried these myself. I am researching the issue and I do not have the option of rooting the device and I cannot live with the flashing. However, I've taken a pretty close look at all three of the above and they are the closest I've found to answering your question.
I have a login screen on my app which accepts a CPF as login (CPF is an unique number identification that every Brazilian citizen have, e.g: 10546819546), but it can also accept passport numbers as the login, and these may have letters on it.
My problem is that I want the keyboard, when it pops up, to show to number/symbols "view" before the default alphabet one. Changing the inputMethod to phone or number does not solve my problem, because as I said, the login may contain letters.
I've seen some explanations to questions somewhat similar to mine but all of them either didn't solve my problem or it was too overcomplicated.
This is merely a small adjust to slightly improve user experience and entertain me developing the app, so if the solution is something like "override the default keyboard, make a custom component" etc, I'll just leave it alone.
TL;DR: I want to show the number/symbol soft keyboard before the letters one.
Unfortunately when it comes to the soft keyboard you are somewhat at the mercy of whoever made the one the user has their device set to. Lots of devices come pre-loaded and defaulted to the swype keyboard. But many others have soft keyboards that were made by the manufacturer of that device. It it up to whoever created it to decide how the keyboard reacts to the android:inputType that you pass to it. It is possible that some of the ones out there right now actual have the behavior you are looking for when you set them to number or phone. I just checked it out on my sidekick and found that it was the same as yours both number and phone provided no way to input letters.
Is it a good practice to define the alphabetic shortcuts (alphabeticShortcut) of the menu items?
I ask because I've never used them in any of the Android devices that I have owned, even those that have a physical keyboard. Is there any reason to define them? Maybe an accessibility use-case than I'm not seeing?
Is it a good practice to define the
alphabetic shortcuts
(alphabeticShortcut) of the menu
items?
It doesn't hurt to have them, AFAIK. However, at present, I expect few users to use them:
They are not discoverable, at least on option menus, so users won't know they are there or how to invoke them
IMHO they are only really useful with a hardware keyboard, with the keyboard exposed, which limits their utility to a small percentage of Android device users
Now, I can see scenarios where Google TV might make greater use of them, but we won't know until Google TV hardware (and, particularly, input devices) start to ship. Also, you can define numeric shortcuts, which might be usable by more devices in the future, if we start seeing 12-key Android phones.
I'd lump menu shortcuts in with context menus -- nice to have, good for power users, but they should not be a critical piece of the user experience.