当前位置:操作系统 > 安卓/Android >>

Android Manifest之<instrumentation>元素中文注释

语法
    <instrumentation android:functionalTest=["true" | "false"]
                android:handleProfiling=["true" | "false"]
                android:icon="drawableresource"
                android:label="stringresource"
                android:name="string"
                android:targetPackage="string"/>
父元素
    <manifest>
描述
    声明Instrumentation类,它让你监控应用同系统的交互。Instrumentation类的对象会在应用的所有组件初始化之前被构建。
属性
    android:functionalTest
        用于指定Instrumentation类是否应该作为一个功能性的测试来运行,如果设置为true,则运行,否则不运行。默认值是false。
    android:handleProfiling
        指定Instrumentation对象是否会开启和关闭分析功能。如果设置为true,那么由Instrumentation对象来决定分析功能的启动和终止时机,如果设置为false,则分析功       能会持续到Instrumentation对象整个运行周期。如果设置为true,会使Instrumentation对象针对一组特定的操作来进行分析。默认值是false。
    android:icon
        Instrumentation类呈现给用户的图标。这个属性必须设置为一个资源对象的引用。
    android:label
        用户可读的Instrumentation类的标签。这个标签能被设置为原生串或到字符串资源的引用。
    android:name
        Instrumentation子类的名称。它应当是完整的类名(例如,“com.example.project.StringInstrumentation”)。然而,还有一种简写方式,如果这个名称的第一个字符是     点,那么它将追加到<manifest>元素指定的包名的后面。
        没有默认值,必须被指定。
    android:targetPackage
        Instrumentation对象将要运行的应用。这个应用由在它的manifest文件中由<manifest>元素分配的包名来指定。
出处
    API Level 1
补充:移动开发 , Android ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,