AMD
AMD

Reputation: 1722

How to change language of input method as device language changes

I have created a custom keyboard with English xml and Russian xml-ru layout files.

When the user changes the device locale from English to Russian or Russian to English, the layout should change to selected locale.

In my case, it changes only when device orientation changes.

Upvotes: 2

Views: 228

Answers (1)

Uday Nayak
Uday Nayak

Reputation: 429

Change your resources in onConfigurationChanged.

@Override
public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
}

Upvotes: 2

Related Questions