读书人

Android Manifest之lt;instrumentationgt;

发布时间: 2013-09-08 15:21:21 作者: rapoo

Android Manifest之<instrumentation>元素中文注释
语法

<instrumentation android:functionalTest=["true" | "false"]

android:handleProfiling=["true" | "false"]

android:icon="drawable resource"

android:label="string resource"

android:name="string"

android:targetPackage="string"/>

父元素

<manifest>

描述

声明Instrumentation类,它让你监控应用同系统的交互。Instrumentation类的对象会在应用的所有组件初始化之前被构建。

属性

android:functionalTest

用于指定Instrumentation类是否应该作为一个功能性的测试来运行,如果设置为true,则运行,否则不运行。默认值是false。

android:handleProfiling

指定Instrumentation对象是否会开启和关闭分析功能。如果设置为true,那么由Instrumentation对象来决定分析功能的启动和终止时机,如果设置为false,则分析功 能会持续到Instrumentation对象整个运行周期。如果设置为true,会使Instrumentation对象针对一组特定的操作来进行分析。默认值是false。

android:icon

Instrumentation类呈现给用户的图标。这个属性必须设置为一个资源对象的引用。

android:label

用户可读的Instrumentation类的标签。这个标签能被设置为原生串或到字符串资源的引用。

android:name

Instrumentation子类的名称。它应当是完整的类名(例如,“com.example.project.StringInstrumentation”)。然而,还有一种简写方式,如果这个名称的第一个字符是 点,那么它将追加到<manifest>元素指定的包名的后面。

没有默认值,必须被指定。

android:targetPackage

Instrumentation对象将要运行的应用。这个应用由在它的manifest文件中由<manifest>元素分配的包名来指定。

出处

API Level 1

1楼shiyiyufen3天前 09:51
大神!

读书人网 >Android

热点推荐