Android Knowledge Summary

Source: Internet
Author: User

1.assets: The corresponding tag will not be generated under the R.java file, theAssets folder can create its own folder and must be accessed using the Assetsmanager class. The resources stored here will be bundled into the program installation package when running

2.res: tokens are generated under the R.java file, where the resources are used to determine which ones are in use when the package operation is run, and the file resources that are not used are not packaged in the installation package.

Res/raw and Assets folders to store files that do not need to be compiled into binary systems, such as font files, etc.


You can also define directories under the Res folder:

Res/anim: This is an animated resource.

res/xml: You can use GetResource () in activity. GetXML () Read the resource file here

Res/raw: files in this directory can be copied directly to the device, cannot have subfolders , compile the software, the data here does not need to compile, directly into the program installation package, using the method is GetResource (). Openrawresources (ID), where the parameter ID is in the form of r.raw.xxx.

Android Knowledge Summary

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.