找回密码
 立即注册
android开发 2022-11-09 41 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
Android使用程序主要由代码和资源组建。资源主要就是指那些与UI相关的工具,例如UI布局、字符串和图片等。代码和资源分隔可以使得使用程序在运行时依据实际需要来安排UI。这样就可使得使用程序只需要编译一次,就可以支持不同的UI布局。这种特性使得使用程序在运行时可以习惯不同的屏幕大小和密度,以及不同的国家和语言等。资源在Android使用程序编译的进程中,也会被编译成二进制格式。这是为了压缩资源存储空间,以及加速运行时的资源解析速度。Android使用程序在运行的时候,资源管理器AssetManager和Resources会依据当时的机器设置,即屏幕大小、密度、方向,以及国家、区域语言的信息,搜索正确的资源,而且进行解析,最后将它们渲染在UI上。这个PPT讲Android使用程序资源的编译、打包,以及它们在运行时的搜索、解析进程。理解Android使用程序资源管理框架,有助于我们更好地开发布可以适配多种机型的使用程序。

(Android application is mainly composed of code and resources. Resources mainly refer to UI related tools, such as UI layout, strings and images. The separation of code and resources allows the user program to arrange the UI according to actual needs at runtime. In this way, the user program only needs to be compiled once to support different UI layouts. This feature allows users to get used to different screen sizes and densities, as well as different countries and languages. Resources will also be compiled into binary format in the process of Android program compilation. This is to compress the resource storage space and speed up resource resolution at runtime. When the Android application is running, the resource manager Asset Manager and Resources will search for the correct resources based on the current machine settings, that is, screen size, density, direction, and national and regional language information, parse them, and finally render them on the UI. This PPT talks about the compilation and packaging of Android application resources, as well as their search and parsing processes at runtime. Understanding the Android application resource management framework will help us better launch applications that can adapt to multiple models.)

[下载]10384504758.rar




上一篇:Android应用程序UI架构
下一篇:Android应用程序进程管理