Project Development Subtotal < one > Android development pits, version compatible

Source: Internet
Author: User
Tags addall

1, Nosuchmethod lower version will not be called inside the method
The first is:
This.setbackgrounddrawable ();
This is the expiration method, but it is recommended to use it, because after Android 2.3 if you try to use the new API This.setbackground ();

Followed by:
arrayadapter<string> arrayadapter = new arrayadapter<string> (null, 0);
Arrayadapter.addall (New arraylist<string> ());

Please do not use the Arrayadapter inside the AddAll method, if you send Android Environment 4.0, you will get a warning, generally we can do so

Add an annotation, @SuppressLint ("Newapi"), but it is recommended that you do not, or to use the old method of honesty, new time through the construction method to pass the list in, or you can judge the version is also available


It's a bit messy, essays ...

Project Development Subtotal < one > Android development pits, version compatible

Related Article

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.