Resolving an Android hover window exception: Java.lang.IllegalArgumentException:View not attached to window manager

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.