Android API Guides 之 App Manifest(17) - <permission-tree>
2014-04-06 21:19
543 查看
<permission-tree>
SYNTAX:<permission-tree android:icon="drawable resource" android:label="string resource" ] android:name="string" />
CONTAINED IN:
<manifest>DESCRIPTION:Declares the base name for a tree of permissions. The application takes ownership of all names within the tree. It can dynamically add new permissions to the tree by calling
PackageManager.addPermission().
Names within the tree are separated by periods ('
.'). For example, if the base name is
com.example.project.taxes,
permissions like the following might be added:
com.example.project.taxes.CALCULATE
com.example.project.taxes.deductions.MAKE_SOME_UP
com.example.project.taxes.deductions.EXAGGERATE
Note that this element does not declare a permission itself, only a namespace in which further permissions can be placed. See the
<permission>element
for information on declaring permissions.
ATTRIBUTES:
android:iconAn icon representing all the permissions in the tree. This attribute must be set as a reference to a drawable resource containing the image definition.
android:labelA user-readable name for the group. As a convenience, the label can be directly set as a raw string for quick and dirty programming. However, when the application is ready to be published, it should be set as a reference
to a string resource, so that it can be localized like other strings in the user interface.
android:nameThe name that's at the base of the permission tree. It serves as a prefix to all permission names in the tree. Java-style scoping should be used to ensure that the name is unique. The name must have more than two period-separated
segments in its path — for example,
com.example.baseis OK, but
com.exampleis not.INTRODUCED IN:API Level 1SEE ALSO:
<permission>
<permission-group>
<uses-permission>
相关文章推荐
- Android API Guides 之 App Manifest(9) - <grant-uri-permission>
- Android API Guides 之 App Manifest(14) - <path-permission>
- Android API Guides 之 App Manifest(16) - <permission-group>
- Android API Guides 之 App Manifest(5) - <application>
- Android API Guides 之 App Manifest(19) - <receiver>
- Android API Guides 之 App Manifest(6) - <category>
- Android API Guides 之 App Manifest(7) - <compatible-screens>
- Android API Guides 之 App Manifest(8) - <data>
- Android API Guides 之 App Manifest(10) - <instrumentation>
- Android API Guides 之 App Manifest(11) - <instrumentation>
- Android API Guides 之 App Manifest(12) - <manifest>
- Android API Guides 之 App Manifest(13) - <meta-data>
- Android API Guides 之 App Manifest(15) - <permission>
- Android API Guides 之 App Manifest(2) - <action>
- Android API Guides 之 App Manifest(3) - <activity>
- Android API Guides 之 App Manifest(4) - <activity-alias>
- Android API Guides 之 App Manifest(18) - <provider>
- Android API Guides 之 App Manifest(20) - <service>
- AndroidMainfest.xml详解——<permission-tree>
- Android开发-API指南-<permission-tree>