I have interesting problem. In the Fragments after inputing text in EditText field i catching next Exception:
java.lang.NullPointerException: Attempt to invoke interface method 'void android.view.inputmethod.InputConnection.closeConnection()' on a null object reference
at android.view.inputmethod.InputConnectionWrapper.closeConnection(InputConnectionWrapper.java:270)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:541)
at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:85)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:251)
at android.app.ActivityThread.main(ActivityThread.java:6572)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
And only after fragment is destroy. And this case appears in all fragments that has EditText. I think there is some problems with InputMethodManager
but how to solve it - don't know. Notably, the problem does not appear on all devices.
If anyone know, what happens and how to solve this - please, tell me) Thanks.