`

【翻译】(32)资源类型

 
阅读更多

 

【翻译】(32)资源类型

 

see

http://developer.android.com/guide/topics/resources/available-resources.html

 

原文见

http://developer.android.com/guide/topics/resources/available-resources.html

 

-------------------------------

 

Resource Types

 

资源类型

 

-------------------------------

 

See also

 

另见

 

Providing Resources 提供资源

Accessing Resources 访问资源

 

-------------------------------

 

Each of the documents in this section describe the usage, format and syntax for a certain type of application resource that you can provide in your resources directory (res/).

 

本章节的每个文档描述你可以在你的资源目录(res/)中可以提供的某个类型应用程序资源的用法、格式和语法。

 

Here's a brief summary of each resource type:

 

这里是每个资源类型的简短概述:

 

* Animation Resources

 

* 动画资源

 

Define pre-determined animations.

 

定义预设动画。

 

Tween animations are saved in res/anim/ and accessed from the R.anim class.

 

补间动画被保存在res/anim/中并且从R.anim类中访问。

 

Frame animations are saved in res/drawable/ and accessed from the R.drawable class.

 

帧动画被保存在res/drawable/中并且从R.drawable类中访问。

 

* Color State List Resource

 

* 颜色状态列表资源

 

Define a color resources that changes based on the View state.

 

定义一个颜色资源,它基于View的状态而改变。

 

Saved in res/color/ and accessed from the R.color class.

 

保存在res/color/中并且从R.color类中访问。

 

* Drawable Resources

 

* 可绘画对象资源

 

Define various graphics with bitmaps or XML.

 

用位图或XML定义不同的图形。

 

Saved in res/drawable/ and accessed from the R.drawable class.

 

保存在res/drawable中并且从R.drawable类中访问。

 

* Layout Resource

 

* 布局资源

 

Define the layout for your application UI.

 

为你的应用程序的用户界面定义布局。

 

Saved in res/layout/ and accessed from the R.layout class.

 

保存在res/layout/中并且从R.layout类中访问。

 

* Menu Resource

 

* 菜单资源

 

Define the contents of your application menus.

 

定义你的应用程序菜单的内容。

 

Saved in res/menu/ and accessed from the R.menu class.

 

保存在res/menu/中并且从R.menu类中访问。

 

* String Resources

 

* 字符串资源

 

Define strings, string arrays, and plurals (and include string formatting and styling).

 

定义字符串,字符串数组,以及复数(还包括字符串的格式和样式)。

 

Saved in res/values/ and accessed from the R.string, R.array, and R.plurals classes.

 

保存在res/values/中并且从R.string,R.array,以及R.plurals类中访问。

 

* Style Resource

 

* 样式资源

 

Define the look and format for UI elements.

 

定义用户界面元素的外观和格式。

 

Saved in res/values/ and accessed from the R.style class.

 

保存在res/values/中并且从R.style类中访问。

 

* More Resource Types

 

* 更多资源类型

 

Define values such as booleans, integers, dimensions, colors, and other arrays.

 

定义值诸如布尔型,整型,尺寸,颜色,以及其它数组。

 

Saved in res/values/ but each accessed from unique R sub-classes (such as R.bool, R.integer, R.dimen, etc.).

 

保存在res/values/中但每个类型从唯一的R子类(注:内嵌类)中访问(诸如R.bool,R.integer,R.dimen,等等。)。

 

Except as noted, this content is licensed under Apache 2.0. For details and restrictions, see the Content License.

 

除特别说明外,本文在Apache 2.0下许可。细节和限制请参考内容许可证。

 

Android 4.0 r1 - 04 Jan 2012 0:53

 

-------------------------------

 

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

 

(此页部分内容基于Android开源项目,以及使用根据创作公共2.5来源许可证描述的条款进行修改)

 

(本人翻译质量欠佳,请以官方最新内容为准,或者参考其它翻译版本:

* ソフトウェア技術ドキュメントを勝手に翻訳

http://www.techdoctranslator.com/android

* Ley's Blog

http://leybreeze.com/blog/

* 农民伯伯

http://www.cnblogs.com/over140/

* Android中文翻译组

http://androidbox.sinaapp.com/

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics