Suppose the app has some EditTexts that need specific locale to be used for the keyboard (or what's available in case they are missing), one for each EditText, how can you request that?
Asked
Active
Viewed 141 times
-2
-
AFAIK, there is no means to do that. – CommonsWare Jun 02 '15 at 12:38
1 Answers
1
Changing the locale will change the strings.xml file etc. that the app uses.
Take a look at this answer on how you can switch keyboards.
Edit You can't programmatically change the keyboard as its an application - as the link above states, you have to start an Intent to take the user to the settings keyboard input, so they can change it themselves. See this link Change Keyboard input language
This intent will open your input settings.
startActivity(new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS));
Also consider issues, if the user doesn't have the relevant charset or keyboard installed? How does your app react?
-
I was talking only about the input of the keyboard. the keyboard has buttons with characters. I want to know if it's possible to request the locale for them only. For example, to choose German for the language that's used in the keyboard (in order to write in German). – android developer Jun 02 '15 at 12:49
-
-
That's why I asked it for. About the issues, this is a request from the keyboard app, just like a request to show digits. If the keyboard app can't handle it, it won't. – android developer Jun 03 '15 at 05:19