I\'ve tried the advice here, the advice here, the advice here, I\'ve commented out the onAttachedToWindow() in my Base Activity. I have two Activities inheriting from this
I also had this problem, but I solved it by removing the Window, changing the params and then adding the window again. This was good enough for me.
WindowManager.removeView(View);
params = params2; //changed the params to something else
WindowManager.updateViewLayout(View, params);
WindowManager.addView(View, params);