Organize resource in Android
2015-10-08 10:14
260 查看
Directory | Resource Type |
---|---|
anim/ | XML files that define property animations. They are saved in res/anim/ folder and accessed from the R.anim class. |
color/ | XML files that define a state list of colors. They are saved in res/color/ and accessed from the R.color class. |
drawable/ | Image files like .png, .jpg, .gif or XML files that are compiled into bitmaps, state lists, shapes, animation drawable. They are saved in res/drawable/ and accessed from the R.drawable class. |
layout/ | XML files that define a user interface layout. They are saved in res/layout/ and accessed from the R.layout class. |
menu/ | XML files that define application menus, such as an Options Menu, Context Menu, or Sub Menu. They are saved in res/menu/ and accessed from the R.menu class. |
raw/ | Arbitrary files to save in their raw form. You need to callResources.openRawResource() with the resource ID, which isR.raw.filename to open such raw files. |
values/ | XML files that contain simple values, such as strings, integers, and colors. For example, here are some filename conventions for resources you can create in this directory − arrays.xml for resource arrays, and accessed from the R.array class. integers.xml for resource integers, and accessed from the R.integer class. bools.xml for resource boolean, and accessed from the R.bool class. colors.xml for color values, and accessed from theR.color class. dimens.xml for dimension values, and accessed from the R.dimen class. strings.xml for string values, and accessed from theR.string class. styles.xml for styles, and accessed from the R.styleclass. |
xml/ | Arbitrary XML files that can be read at runtime by callingResources.getXML(). You can save various configuration files here which will be used at run time. |
相关文章推荐
- Android读取、加入联系人
- Android Studio中通过快捷键来提取提取方法
- Android 自定义对话框
- android API Level
- Android 中的 Service 全面总结
- Android根据标签长度自动换行
- LinearLayout的weight属性的解释
- android&java 正则表达式
- Android应用程序如何进行系统签名
- Android应用程序如何进行系统签名
- android全屏去掉title栏的多种实现方法
- Android开发总结笔记 Spannable(文本样式[下]) 1-1-6-3
- Android的string-array数据源简单使用
- 在webstorm中生成运行Android程序
- Android代码规范
- Android 几种常用的Dialog的简单使用
- Android 传感器(详解一)
- Android开发之实现拨号功能
- Android开发如何去除标题栏title
- Android代码规范