Skip to content Skip to sidebar Skip to footer

Window Already Focused, Ignoring Focus Gain Of: Com.android.internal.view.IInputMethodClient$Stub$Proxy@41141af0

I want to change language base on drop down menu list.But this code does not working properly. It is showing this problem Window already focused, ignoring focus gain of: com.androi

Solution 1:

Just for the try...
Instead of calling onConfigChange() method... make one user define function say toChangeConfig(Config c) and do the same step of code in that function as you wrote in onConfigChange() and now call this function in onItemSelected.


Solution 2:

Give the root element in your layout an ID. Now try to removeAllViews before inflating the content a second time.

It's just a guess but worth a try.


Solution 3:

Try using updateConfiguration method

DisplayMetrics dm = getResources().getDisplayMetrics();
updateConfiguration(config, dm);

Solution 4:

Externalize strings, use the naming method and let android take care of it for you.

You will also need to do what MKJParekh said - the onConfigChange() is a callback, not something you call. It gets called when you switch the configuration, so put another

Log.d("MY APP", "::onConfigurationChange() fired!");

and wait for it to show up. Also, that code shouldn't be in onCreate(), but rather in onResume - remember that onCreate() needs to be a light method.


Post a Comment for "Window Already Focused, Ignoring Focus Gain Of: Com.android.internal.view.IInputMethodClient$Stub$Proxy@41141af0"