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