"Android Note" references a third-party custom control error: Tip:use View.isineditmode () in your custom views to skip code when shown in Eclipse

Source: Internet
Author: User

Often open other people's projects, found that the layout of the use of some third-party custom controls, graphical layout label is unable to preview the page, throw some exceptions:

For hints Tip:use view.isineditmode () in your custom views to skip code when shown in Eclipse.

Or a direct throw of the java.lang.NullPointerException,

We directly find the code for the view layer, and the workaround is to locate the triggering error code snippet and use the code line that caused the error
if (!isineditmode ()) {
Code snippet that caused the error
}
Wrapped so that the code snippet is skipped when displayed in Eclipse and no more errors occur.

This will allow you to preview the layout normally.

Reference Original: http://blog.csdn.net/changemyself/article/details/43794725

"Android Note" references a third-party custom control error: Tip:use View.isineditmode () in your custom views to skip code when shown in Eclipse

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.