现在的位置: 首页 > 综合 > 正文

android 中的 res 资源

2018年04月20日 ⁄ 综合 ⁄ 共 428字 ⁄ 字号 评论关闭
1.android xml 文件类型:
2.android xml 文件根元素类型:
3.android res 资源文件下包含的文件的类型

各种 drawable 目录, 都是在什么情况下加载?
res

---drawable
---layout
---values
---------string.xml
---------arrays.xml
---------color.xml
---------dimens.xml
---------styles.xml
4. android  values 中数据的使用
res 中的文件都会在 R.java 中生成静态内部类, 并且在内部类生成 id, 这样就给每个 res 资源加上了 id. 这种 id-资源 的扁平式映射, 方便了 android 原程序对于资源的管理和使用. 通过 android framework 层的资源管理系统的支持, 在 android  源程序中可以直接通过 id 来使用资源.
使 android 应用的 UI 资源和 android 源程序隔离. 达到了 UI 和 源代码隔离的目的.

抱歉!评论已关闭.