【翻译】(45)action元素
【翻译】(45)action元素
?
see
http://developer.android.com/guide/topics/manifest/action-element.html
?
原文见
http://developer.android.com/guide/topics/manifest/action-element.html
?
-------------------------------
?
<action>
?
action元素
?
-------------------------------
?
* syntax:
?
* 语法:
?
-------------------------------
?
<action android:name="string" />
?
-------------------------------
?
* contained in:
?
* 包含在:
?
<intent-filter>
?
* description:
?
* 描述:
?
Adds an action to an intent filter. An <intent-filter> element must contain one or more <action> elements. If it doesn't contain any, no Intent objects will get through the filter. See Intents and Intent Filters for details on intent filters and the role of action specifications within a filter.
?
添加一个动作到一个意图过滤器。一个<intent-filter>元素必须包含一个或多个<action>元素。如果它不包含任何元素,那么没有Intent对象将通过过滤器。参见意图与意图过滤器以获取关于意图过滤器和在一个过滤器中动作规范的作用的细节。
?
* attributes:
?
* 属性:
?
* android:name
?
The name of the action. Some standard actions are defined in the Intent class as ACTION_string constants. To assign one of these actions to this attribute, prepend "android.intent.action." to the string that follows ACTION_. For example, for ACTION_MAIN, use "android.intent.action.MAIN" and for ACTION_WEB_SEARCH, use "android.intent.action.WEB_SEARCH".
?
动作名称。一些标准动作被定义在Intent类中作为ACTION_string常量。为了赋予这些动作中的一个到这个属性,前加上"android.intent.action."到ACTION_后面的字符串。例如,对于ACTION_MAIN,使用"android.intent.action.MAIN",而对于ACTION_WEB_SEARCH,使用"android.intent.action.WEB_SEARCH"。
?
For actions you define, it's best to use the package name as a prefix to ensure uniqueness. For example, a TRANSMOGRIFY action might be specified as follows:
?
对于你定义的动作,最好使用包名作为前缀以确保唯一性。例如,一个TRANSMOGRIFY动作(注:英文意思是“变形”)可能被指定如下:
?
-------------------------------
?
<action android:name="com.example.project.TRANSMOGRIFY" />
?
-------------------------------
?
* introduced in:
?
* 引入:
?
API Level 1
?
API级别1
?
* see also:
?
* 另见:
?
<intent-filter>
?
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 - 27 Jan 2012 1:49
?
-------------------------------
?
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/
)