SYNTAX:
<category android:name="string" />
CONTAINED IN:
<intent-filter>
DESCRIPTION:
Adds a category name to an intent filter. See Intents and Intent Filtersfor details on intent filters and the role of category specifications within a filter.
ATTRIBUTES:
android:name
The name of the category. Standard categories are defined in the Intentclass as CATEGORY_nameconstants. The name assigned here can be derived from those constants by prefixing " android.intent.category." to the namethat follows CATEGORY_. For example, the string value for CATEGORY_LAUNCHERis " android.intent.category.LAUNCHER".

Note:In order to receive implicit intents, you must include theCATEGORY_DEFAULTcategory in the intent filter. The methodsstartActivity()andstartActivityForResult()treat all intents as if they declared theCATEGORY_DEFAULTcategory. 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.

INTRODUCED IN:
API Level 1
SEE ALSO:
<action>

<data>


句法:
<类别 的Android:名称 = 字符串 />
包含在:
<意图过滤器>
描述:
添加一个类别名称,一个意图过滤器。见 意图和意图过滤器上的意图过滤器的详细信息和类别规格的过滤器中的作用。
属性:
安卓:名称
的类别的名称。标准类别的定义 意图CATEGORY_常量。这里分配的名字可以从这些常数由前缀派生“ android.intent.category。”到 名称后面 CATEGORY_。例如,对于字符串值 CATEGORY_LAUNCHER是“ android.intent.category.LAUNCHER”。

注:为了获得隐含的意图,你必须包括CATEGORY_DEFAULT的意图过滤类别。方法startActivity()startActivityForResult()把所有的意图,如果他们宣布CATEGORY_DEFAULT类别。如果你没有在你的意图过滤器声明它,没有隐含意图将解析为您的活动。

自定义类别应该使用包名作为前缀,以确保它们是唯一的。

介绍了:
API级别1
也可以看看:
<操作>
<数据>

更多相关文章

  1. android 2.2 apidemos 赏析笔记 4
  2. 【转】Android(安卓)Intent Action 大全
  3. Android事件分发机制
  4. android studio第一个项目hello world之AndroidManifest.xml内容
  5. AndroidManifest 中android:exported
  6. 打电话和发短信程序
  7. android 电话拨号器
  8. Android术语
  9. Android必备:Activity 活动 和 Intent 意图 的学习整理

随机推荐

  1. Android程序版本控制工具类
  2. Android 毛玻璃效果的实现
  3. Android的界面设计工具——DroidDraw
  4. Android 数独游戏 记录
  5. Android中文API(132) —— GpsSatellite
  6. Android中文API(136) —— Bitmap
  7. Android ImageView 的scaleType属性
  8. android定时器(Timer,TimerTask)
  9. 安卓,rebuild apk错误解决
  10. Android序列化基础知识