"Android API Guides (i)" App Resourses--overview

Source: Internet
Author: User

The reason for separating the data from the program is that the surface is for independent management of the data, and the underlying reason is that the app is compatible with different environments even if your data supports special devices in different languages or different screen sizes. This is very and more important!
For a variety of resources, we are divided into two types:
Default resources and alternative resources for different environments
For example, the default resource is stored under Res/layout/directory, and the alternate resources for the device in the yaw direction are stored in the res/layout-land/directory (the specific way of the device in the yaw direction, see figure). When there are only default resources, see Figure 1. When an alternative resource is set, as shown in Figure two, the Android system automatically provides the appropriate alternative resources by matching the device environment.

We find that achieving high compatibility with apps is the reason for separating data from programs, but it also brings new problems, and how does Android automatically adapt to different device environments?
I think we'll get an answer in the following 5 guides documents:
Providing Resources
Answer: What kind of resources can you provide in your app? Where to store them? How to generate specific equipment resources for different device environments?
accessing Resources
Answer: How do you use the resources you provide, or reference them in your app code or XML document?
Handling Runtime Changes
Answer: When your interface is running, how to deal with the situation of environmental change?
Localization
Solution: one from detail to specific by using specific resources to locate (materialize) your app.
Resource Types
Solution: Provide references to different resources by explaining the elements, attributes, and syntax of different resources in XML.

"Android API Guides (i)" App Resourses--overview

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.