The window is already focused - ignoring focus amplification com.android.internal.view

I have seen many solutions for this, but no one works for me! I ran into this problem in two previous cases, and I just had to go back to my backup code for it to work. I never found out why this is happening. Some people say this is just a warning, so you can ignore it. But I cannot move from one intention to another. This is the exact case - I created a menu from where I add something. Therefore, when I click on the menu and then click on the "Add item" button, it does nothing! It just gives this warning and stays on one screen. So I'm stuck! Can someone explain why this error is caused, and what is the best way to fix it?

WARN/InputManagerService(61): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@405b1d68 
+4
source share
2 answers

Try adding your activity to the manifest file:

 <activity android:name="activity name" android:screenOrientation="portrait" ></activity> 
+2
source

Check the event handler method for the menu. I found that I use

 public boolean onOptionsItemSelected(MenuItem item) 

I switched to the following and fixed the problem.

 public boolean onMenuItemSelected(int featureId, MenuItem item) 

I received the same warning and my event did not start the next event. Look at your method and see if it indicates that you are redefining it. I was not. As soon as I changed the method, I redefined and worked.

+2
source

All Articles