Android API Guides 之 App Manifest(2) - <action>
2014-04-06 21:05
381 查看
<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 Filtersfor details on intent filters and the role of action specifications within a filter.ATTRIBUTES:
android:nameThe name of the action. Some standard actions are defined in the
Intentclass
as
ACTION_stringconstants. To assign one of these actions to this attribute, prepend "
android.intent.action."
to the
stringthat follows
ACTION_. For example, for
ACTION_MAIN,
use "
android.intent.action.MAIN" and for
ACTION_WEB_SEARCH, use "
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
TRANSMOGRIFYaction might be
specified as follows:
<action android:name="com.example.project.TRANSMOGRIFY" />
INTRODUCED IN:API Level 1SEE ALSO:
<intent-filter>
相关文章推荐
- Android API Guides 之 App Manifest(8) - <data>
- Android API Guides 之 App Manifest(9) - <grant-uri-permission>
- Android API Guides 之 App Manifest(10) - <instrumentation>
- Android API Guides 之 App Manifest(11) - <instrumentation>
- Android API Guides 之 App Manifest(12) - <manifest>
- Android API Guides 之 App Manifest(13) - <meta-data>
- Android API Guides 之 App Manifest(14) - <path-permission>
- Android API Guides 之 App Manifest(15) - <permission>
- Android API Guides 之 App Manifest(16) - <permission-group>
- Android API Guides 之 App Manifest(17) - <permission-tree>
- Android API Guides 之 App Manifest(3) - <activity>
- Android API Guides 之 App Manifest(4) - <activity-alias>
- Android API Guides 之 App Manifest(5) - <application>
- Android API Guides 之 App Manifest(18) - <provider>
- Android API Guides 之 App Manifest(6) - <category>
- Android API Guides 之 App Manifest(19) - <receiver>
- Android API Guides 之 App Manifest(7) - <compatible-screens>
- Android Manifest之<action>元素中文注释
- Android API Guides 之 App Manifest(20) - <service>
- Android学习之 移动应用<App>微信支付集成小结