標籤:
<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
Android開發-API指南-<instrumentation >