Android开发-API指南-<instrumentation >

<instrumentation>

英文原文:http://developer.android.com/guide/topics/manifest/instrumentation-element.html
采集(更新)日期:2014-7-1
搬迁自原博客:http://blog.sina.com.cn/s/blog_48d491300100zmui.html

语法:
<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”表示否。 默认值是“false”。
android:handleProfiling
Instrumentation 对象是否能够开启和关闭性能分析功能(profiling) — “true”表示它可以自行决定何时启动和停止,“false”表示整个运行期间都将持续开启。 设为“true”使得 Instrumentation 对象可以只针对某些操作进行性能分析。 默认值是“false”。
android:icon
代表 Instrumentation 类的图标。这个属性必须设为 drawable 资源。
android:label
供用户阅读的代表 Instrumentation 类的文本标签。可直接设为字符串,也可设为对字符串资源的引用。
android:name
Instrumentation 子类的名称。 应设为完全限定格式的类名称(比如“com.example.project.StringInstrumentation”)。 不过作为简称,如果类名的首字符是句点,则 <manifest>元素中设置的包名将会自动添加到前面。

没有默认值,类名必须指定。

android:targetPackage
运行 Instrumentation 对象对应的应用程序。 应用程序由其 Manifest 文件中 <manifest>元素设置的包名称指定。
引入自:
API 级别 1

posted on 2014-12-22 15:48  呆呆大虾  阅读(443)  评论(0编辑  收藏  举报

导航