Android開發-API指南-<instrumentation >

來源:互聯網
上載者:User

標籤:

<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 >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.