1

How to: - open keyboard without focus on edittext, - check which languages are installed and - change input language to other language?

Thanks

Pedro
  • 11
  • 2
  • 5
  • I'm not sure if the changing keyboard language is possible, you can change the entire locale with something like [this](http://stackoverflow.com/a/18733302/2864464). – Alexander Kohler Dec 03 '14 at 14:50
  • 1
    Already asked before and is not possible - http://stackoverflow.com/questions/12303593/change-keyboard-input-language – eeffoc Dec 03 '14 at 14:55

1 Answers1

-2

It's possible. You can set the locale. However, i would not recommend that. We've tried it at early stages, it's basically fighting the system. We have same requirement for changing language, but decided to settle to the fact that UI should be same as phone UI. It was working via setting locale but was too buggy. And you have to set it every time you enter activity ( each activity ) from my experience. here is a code if you still need this ( again, i don't recommend that )

Resources res = context.getResources();
// Change locale settings in the app.
DisplayMetrics dm = res.getDisplayMetrics();
android.content.res.Configuration conf = res.getConfiguration();
conf.locale = new Locale(language_code.toLowerCase());
res.updateConfiguration(conf, dm);

If you have language specific content - you can change that base on the setting.

  • 4
    http://stackoverflow.com/a/2900144/3348373 Copy Paste! Give some credits to original author – Darshn Nov 16 '15 at 12:45
  • 1
    down voted it he took it copy and paste from the original auther without referring to him http://stackoverflow.com/questions/12303593/change-keyboard-input-language – Samy Omar Dec 29 '15 at 13:57