Keyboard characters in different locales - android

I'm developing a keyboard (IME) for Android. I want it to be useful for people from every country. So, I need to know which symbols should be placed on keyboard based on current locale.
My first idea is to copy computer keyboard layouts. Where can I get the contents of preferred computer keyboard layout for each locale?
Also, I've noticed that phone keyboards usually contains some special symbols which aren't present on computer keyboard. Which symbols are important for phones and why? For example, all keyboards I've met provide a way to type '¿' symbol. But this symbol doesn't make any sense in my locale (russian) and isn't used in english. Is there a reason for placing this symbol on every keyboard?

Related

Android display # sign with phone soft 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.
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.

Android soft keyboard in Chinese languages

I wanted to open soft keyboard in Chinese languages in my android application which supports localization. Can any one please help me out.
There is no way to do it. The Keyboard is separated app and you have no way to tell it what language you want. Except situation when a keyboard has api's to do it. Your only variant in to write your own internal keyboard.
Anyway, if a system locale is Chinese - user in most cases already have Chinese keyboard so you don't need to worry about it.

Android: Display English keyboard default

Android Kitkat:
Can you give me some hints about the following question ?
Display always English keyboard for a specific edit text field:
Question:
• How can I make sure the English language keyboard is always displayed when the user selects a specific Edit Text field in his tablet where the localization is set to Russian or Japanese or other language ? Basically override the Russian keyboard for a specific textfield
By default, all emulators have the Keyboards for English, Japanese IME
and Chinese installed. Since the keyboard that is used by Android OS
is a user's choice, there is no way to force using a specific keyboard
in the app code. If you want to get rid of the unnecessary keyboards
in the emulator completely, see the following post: Click here
As Christoph said

Android : Writing own "handler" for hardware keyboard?

I own an Asus Transformer (first model) with the US keyboard dock.
However, I'm French, and thus have to interact in French pretty regularly, which does include writing accented letters.
As far as I know, the current workaround for doing that is to basically popup the software keyboard, not very convenient.
One implementation of being able to write accented (and other special letters such as ß) with a traditional QWERTY layout is the one used in Mac OS X. For those who don't know, this is accomplished by pressing alt + a-key-which-usually-makes-a-lot-of-sense (I'm not kidding, they really make sense), that will give you the accent, then the letter which you want to be accented (so alt + e, then e will give you é).
That's the behavior I'd like to implement. However, I don't really find where I'd have to do that.
I looked at the documentation about keyboard devices ( http://source.android.com/tech/input/keyboard-devices.html ) but I don't think that's the right place to do any changes as I don't want to change any keymap or keycodes.
On the other hand, I took a glance at https://github.com/android/platform_frameworks_base/tree/master/core/java/android/inputmethodservice (keyboard.java and keyboardview.java in particular) but I have the impression this is more related to software keyboard.
Does anybody have more clues about this ?
Thanks
I had similar problems with entering Russian characters on TF101. I'm more used to phonetic layout than to standard one.
I was able to modify Android example application SoftKeyboard to accomplish that. You can find code at https://protronika.dyndns.org/websvn/listing.php?repname=FLEXKBD&path=%2F&sc=0 .
Sorry, code is very raw with many things hardcoded. I started that project very recently. So it is in "just works" state.

Android soft keyboard show numbers view first

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.

Categories

Resources