Android API Guides 之 App Manifest(11) - <instrumentation>
来源:互联网 发布:微电影知乎 编辑:程序博客网 时间:2024/05/01 00:50
<intent-filter>
- SYNTAX:
<intent-filter android:icon="drawable resource" android:label="string resource" android:priority="integer" > . . .</intent-filter>
- CONTAINED IN:
<activity>
<activity-alias>
<service>
<receiver>
- MUST CONTAIN:
<action>
- CAN CONTAIN:
<category>
<data>
- DESCRIPTION:
- Specifies the types of intents that an activity, service, or broadcast receiver can respond to. An intent filter declares the capabilities of its parent component — what an activity or service can do and what types of broadcasts a receiver can handle. It opens the component to receiving intents of the advertised type, while filtering out those that are not meaningful for the component.
Most of the contents of the filter are described by its
<action>
,<category>
, and<data>
subelements.For a more detailed discussion of filters, see the separate Intents and Intent Filters document, as well as the Intents Filters section in the introduction.
- ATTRIBUTES:
android:icon
- An icon that represents the parent activity, service, or broadcast receiver when that component is presented to the user as having the capability described by the filter.
This attribute must be set as a reference to a drawable resource containing the image definition. The default value is the icon set by the parent component's
icon
attribute. If the parent does not specify an icon, the default is the icon set by the<application>
element.For more on intent filter icons, see Icons and Labels in the introduction.
android:label
- A user-readable label for the parent component. This label, rather than the one set by the parent component, is used when the component is presented to the user as having the capability described by the filter.
The label should be set as a reference to a string resource, so that it can be localized like other strings in the user interface. However, as a convenience while you're developing the application, it can also be set as a raw string.
The default value is the label set by the parent component. If the parent does not specify a label, the default is the label set by the
<application>
element'slabel
attribute.For more on intent filter labels, see Icons and Labels in the introduction.
android:priority
- The priority that should be given to the parent component with regard to handling intents of the type described by the filter. This attribute has meaning for both activities and broadcast receivers:
- It provides information about how able an activity is to respond to an intent that matches the filter, relative to other activities that could also respond to the intent. When an intent could be handled by multiple activities with different priorities, Android will consider only those with higher priority values as potential targets for the intent.
It controls the order in which broadcast receivers are executed to receive broadcast messages. Those with higher priority values are called before those with lower values. (The order applies only to synchronous messages; it's ignored for asynchronous messages.)
Use this attribute only if you really need to impose a specific order in which the broadcasts are received, or want to force Android to prefer one activity over others.
The value must be an integer, such as "
100
". Higher numbers have a higher priority. The default value is 0. The value must be greater than -1000 and less than 1000.Also see
setPriority()
.
- INTRODUCED IN:
- API Level 1
- SEE ALSO:
<action>
<category>
<data>
- Android API Guides 之 App Manifest(11) - <instrumentation>
- Android API Guides 之 App Manifest(10) - <instrumentation>
- Android API Guides 之 App Manifest(12) - <manifest>
- Android API Guides 之 App Manifest(1) - Structure
- Android API Guides 之 App Manifest(2) - <action>
- 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(6) - <category>
- Android API Guides 之 App Manifest(7) - <compatible-screens>
- Android API Guides 之 App Manifest(8) - <data>
- 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(18) - <provider>
- Android API Guides 之 App Manifest(19) - <receiver>
- Android开发--WIFi基本结构
- Android API Guides 之 App Manifest(9) - <grant-uri-permission>
- Android API Guides 之 App Manifest(10) - <instrumentation>
- Map通过map.keyset或者Map.Entry遍历;map多个value对应一个key,逆向转成一个key对应一个list;通过邮编查多个地名
- C语言作业
- Android API Guides 之 App Manifest(11) - <instrumentation>
- Hibernate的LockMode(悲观锁和乐观锁)
- Android API Guides 之 App Manifest(12) - <manifest>
- Java轻量级业务层框架Spring两大核心IOC和AOP原理
- just so so
- HDU 1176 免费馅饼
- Android API Guides 之 App Manifest(13) - <meta-data>
- Django 1.6 在Windows平台下的配置
- 枚举类型 Java编程思想 读书笔记