Android开发-API指南-<instrumentation >
2014-12-22 15:48
459 查看
<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:functionalTestInstrumentation 类是否要作为功能性测试来运行 — “
true”表示是,“
false”表示否。 默认值是“
false”。
android:handleProfilingInstrumentation 对象是否能够开启和关闭性能分析功能(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
相关文章推荐
- Android开发-API指南-<instrumentation>
- Android开发-API指南-<category>
- Android开发-API指南-<intent-filter>
- Android开发-API指南-<uses-permission>
- Android开发-API指南-<service>
- Android开发-API指南-<application>
- Android开发-API指南-<application>
- Android开发-API指南-<activity>
- Android开发-API指南-<application>[原创译文]
- Android开发-API指南-<supports-screens>
- Android开发-API指南-<permission-group>
- Android开发-API指南-<manifest>
- Android开发-API指南-<path-permission>
- Android开发-API指南-<permission-tree>
- Android开发-API指南-<uses-configuration>
- Android开发-API指南-<permission>
- Android开发-API指南-<grant-uri-permission>
- Android开发-API指南-<receiver>
- Android开发-API指南-<activity-alias>[原创译文]
- Android开发-API指南-<uses-library>