【翻译】(53)instrumentation元素
see
http://developer.android.com/guide/topics/manifest/instrumentation-element.html
原文见
http://developer.android.com/guide/topics/manifest/instrumentation-element.html
-------------------------------
<instrumentation>
instrumentation元素
-------------------------------
* syntax:
* 语法:
-------------------------------
<instrumentation android:functionalTest=["true" | "false"]
android:handleProfiling=["true" | "false"]
android:icon="drawable resource"
android:label="string resource"
android:name="string"
android:targetPackage="string" />
-------------------------------
* contained in:
* 被包含在:
<manifest>
* description:
* 描述:
Declares an Instrumentation class that enables you to monitor an application's interaction with the system. The Instrumentation object is instantiated before any of the application's components.
声明一个Instrumentation类,它使你能监视应用程序与系统的交互。Instrumentation对象在任意应用程序组件之前被实例化。
* attributes:
* 属性:
* android:functionalTest
Whether or not the Instrumentation class should run as a functional test — "true" if it should, and "false" if not. The default value is "false".
该Instrumentation类是否应该运行作为一个功能测试(注:即黑箱测试)——"true"如果它应该,而"false"如果它不应该。默认值为"false"。
* android:handleProfiling
Whether or not the Instrumentation object will turn profiling on and off — "true" if it determines when profiling starts and stops, and "false" if profiling continues the entire time it is running. A value of "true" enables the object to target profiling at a specific set of operations. The default value is "false".
该Instrumentation对象将打开还是关闭性能剖析——"true"如果它决定剖析何时开始和停止,而"false"如果剖析持续于正在运行的整段时间内。一个值"true"使能对象把剖析的目标定在指定的操作集合上。默认值为"false"。
* android:icon
An icon that represents the Instrumentation class. This attribute must be set as a reference to a drawable resource.
代表该Instrumentation类的图标。这个属性必须被设置为指向可绘画对象资源的引用。
* android:label
A user-readable label for the Instrumentation class. The label can be set as a raw string or a reference to a string resource.
该Instrumentation类的一个用户可读的标签。标签可以被设置为一个原始字符串或一个指向字符串资源的引用。
* android:name
The name of the Instrumentation subclass. This should be a fully qualified class name (such as, "com.example.project.StringInstrumentation"). However, as a shorthand, if the first character of the name is a period, it is appended to the package name specified in the <manifest> element.
Instrumentation子类的名称。它应该是一个完全修饰类名(诸如,"com.example.project.StringInstrumentation")。然而,作为简写,如果名称的第一字符是一个点,那么它被尾加到<manifest>元素中指定的包名后面。
There is no default. The name must be specified.
没有默认值。名称必须指定。
* android:targetPackage
The application that the Instrumentation object will run against. An application is identified by the package name assigned in its manifest file by the <manifest> element.
Instrumentation对象将运行对应的应用程序。一个应用程序由它的清单文件中<manifest>元素赋予的包名标识。
* introduced in:
* 引入:
API Level 1
API级别1
Except as noted, this content is licensed under Apache 2.0. For details and restrictions, see the Content License.
除特别说明外,本文在Apache 2.0下许可。细节和限制请参考内容许可证。
Android 4.0 r1 - 10 Feb 2012 0:44
-------------------------------
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
(此页部分内容基于Android开源项目,以及使用根据创作公共2.5来源许可证描述的条款进行修改)
(本人翻译质量欠佳,请以官方最新内容为准,或者参考其它翻译版本:
* ソフトウェア技術ドキュメントを勝手に翻訳
http://www.techdoctranslator.com/android
* Ley's Blog
http://leybreeze.com/blog/
* 农民伯伯
http://www.cnblogs.com/over140/
* Android中文翻译组
http://androidbox.sinaapp.com/
)