Change KEYBOARD LANGUAGE in android studio

2

Dearly I am currently encountering some problems at the time of some classes that vary according to the keyboard that the phone has set, there is some way through the Android studio SDK to change the default keyboard of the phone, at least while it is in use. application or just for the application, thank you already

    
asked by Bruno Sosa Fast Tag 07.11.2017 в 14:37
source

1 answer

3

To change language:

Locale localizacion = new Locale("es", "ES");

Locale.setDefault(localizacion);
Configuration config = new Configuration();
config.locale = localizacion;
getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());

If you need more information look at this article on the Android development page Studio.

    
answered by 07.11.2017 / 20:24
source