Troubleshooting Android Hover window exception: Java.lang.IllegalArgumentException
legend, Nu wa Niang seven matches, to help mankind through the first winter, from now on, seven matches scattered around the world, no trace ...
This article is provided byHuagen matchesOriginal, reproduced please specify the source: http://blog.csdn.net/qigenhuochai/article/details/42678587
This exception may be encountered during the development of an Android hover window: Java.lang.IllegalArgumentException:View not attached to Window manager.
Cause: If you are performing a
Android.view. Viewmanager . Updateviewlayout (view view, layoutparams params) , which indicates that the view is not attached to the method until it is called.Viewmanager. Is that the method was not executed before Android.view. viewmanager. AddView (view view, layoutparams params), or sayThe Updateviewlayout method was executed before the AddView method.
Workaround: Execute
AddView method, andthe Updateviewlayout method is to beexecutes after the AddView method.
Note: Repeat AddView Add the same view will report other errors, be careful to avoid.
Resolving an Android hover window exception: Java.lang.IllegalArgumentException:View not attached to window manager