SYNTAX:
CONTAINED IN:
DESCRIPTION:
Adds a category name to an intent filter. See
Intents and Intent Filters for details on intent filters and the role of category specifications within a filter.
ATTRIBUTES:
INTRODUCED IN:
API Level 1
SEE ALSO:
句法:
包含在:
描述:
添加一个类别名称,一个意图过滤器。见
意图和意图过滤器上的意图过滤器的详细信息和类别规格的过滤器中的作用。
属性:
介绍了:
API级别1
也可以看看:
<category android:name="string" />
<intent-filter>
-
The name of the category. Standard categories are defined in the
Intent
class asCATEGORY_name
constants. The name assigned here can be derived from those constants by prefixing "android.intent.category.
" to thename
that followsCATEGORY_
. For example, the string value forCATEGORY_LAUNCHER
is "android.intent.category.LAUNCHER
".Note: In order to receive implicit intents, you must include the
CATEGORY_DEFAULT
category in the intent filter. The methodsstartActivity()
andstartActivityForResult()
treat all intents as if they declared theCATEGORY_DEFAULT
category. If you do not declare it in your intent filter, no implicit intents will resolve to your activity.Custom categories should use the package name as a prefix, to ensure that they are unique.
android:name
<action>
<类别 的Android:名称 = “ 字符串 ” />
<意图过滤器>
-
的类别的名称。标准类别的定义
意图
类CATEGORY_ 名
常量。这里分配的名字可以从这些常数由前缀派生“android.intent.category。
” 到名称
后面CATEGORY_
。例如,对于字符串值CATEGORY_LAUNCHER
是“android.intent.category.LAUNCHER
”。注:为了获得隐含的意图,你必须包括
CATEGORY_DEFAULT
的意图过滤类别。方法startActivity()
和startActivityForResult()
把所有的意图,如果他们宣布CATEGORY_DEFAULT
类别。如果你没有在你的意图过滤器声明它,没有隐含意图将解析为您的活动。自定义类别应该使用包名作为前缀,以确保它们是唯一的。
安卓:名称
<操作>
<数据>