Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error = ViewRootImpl: sendUserActionEvent() mView == null

I have this error with a spinner inside a fragment = ViewRootImpl: sendUserActionEvent() mView == null , Does anyone know how to fix it ? , thanks in advance!

like image 457
Marco Muñoz Avatar asked Mar 02 '26 21:03

Marco Muñoz


1 Answers

This happens when your fragment becomes detached from its activity. It happens sometimes because of screen rotation. I face same problem on Samsung Galaxy S4, when I opened the camera intent, my activity restarted due to screen orientation change. I fixed my problem by adding this line in my activity in the Manifest file:

android:configChanges="orientation|screenSize"
like image 173
A.J Avatar answered Mar 04 '26 11:03

A.J