Android Application resource overview-resource type (resource types)

Source: Internet
Author: User

This document describes the usage, format, and syntax of each application resource type in the resource catalog (RES.

The following is an overview of each resource type:

Animation Resources)


Define a predefined Animation


The animation is saved in the Res/anim/directory and accessed using the R. anim class.


Frame animations are saved in the Res/drawable/directory and used by the R. drawable class.

Color State List Resource)


Color resources are defined based on changes in the view object status.


It is stored in the Res/color/directory and accessed using the R. color class.

Drawable Resources)


Used for bitmap or XML to define various images.


They are stored in the Res/drawable/directory and accessed using the R. drawable class.

Layout Resource)


Defines the layout of the application UI.


They are stored in the Res/layout/directory and accessed using the R. layout class.

Menu Resource)


Define the content of the application menu.


They are stored in the Res/menu/directory and accessed using the R. Menu class.

String Resources)


Define string, string array, and plural (including string format and style)


They are stored in the Res/values/directory and accessed using the R. String, R. array, and R. plurals classes.

Style Resource)


Defines the appearance and format of the UI element.


They are stored in the Res/values/directory and accessed using the R. Style Class.

More resource types)


Defines such as Boolean, integer, size, color, and other arrays.


They are stored in the Res/values/directory, but each resource must be accessed using the R subclass (such as R. bool, R. integer, R. dimen, and so on ).

 

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.