Android Library Usage Rules

Source: Internet
Author: User

1. A project must be declared as the IS library. Use the library's project to import the library.

2. The name of the activity in the library's manifect must be clearly defined to avoid being found. Also in the project you have to declare the activity of the referenced library (with the same package name).

3. The project can use all the resources under the library's res, but the files inside the assets cannot. For example, the library code will be accessed in the assets of a picture, if not in the project also save a picture, will cause an error, because the file cannot be found. The reason is that the system takes priority to the project assets inside to find instead of going to the library.

4. Resources can be overwritten. For example, two projects are common to a library. For the same resource picture file, there are two versions of two items. Then you just need to use your own images in your own res. Be aware, however, that the image must be the same name (including the extension). That is, image.jpg cannot be replaced by Image.png.

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.