【翻译】(59)permission-tree元素

【翻译】(59)permission-tree元素

 

see

http://developer.android.com/guide/topics/manifest/permission-tree-element.html

 

原文见

http://developer.android.com/guide/topics/manifest/permission-tree-element.html

 

-------------------------------

 

<permission-tree>

 

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:

 

声明权限树的基名称。应用程序持有树中所有名称的拥有权。它可以通过调用PackageManager.addPermission()动态地添加新的权限到树。树中的名称被点号('.')分隔。例如,如果基名称是com.example.project.taxes,那么像以下所示的权限可能被添加:(注:下文中tax的意思是税,deduction的意思是扣除,三个权限名貌似分别代表税计算,税扣除的一些提升,税扣除的扩大)

 

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.

 

注意这个元素自身不声明一个权限,只是一个名字空间,更多的权限可以被放置在它里面。参见<permission>元素以获得关于声明权限的信息。

 

* attributes:

 

* 属性:

 

* android:icon

 

An 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:label

 

A 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:name

 

The 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.base is OK, but com.example is not.

 

在权限树的基上的名称。它充当树中所有权限名称的前缀。Java风格作用域应该被使用以确保名称是唯一的。名称在它的路径中必须多于两个点号分隔段——例如,com.example.base是可以的,但com.example不行。

 

* introduced in:

 

* 引入:

 

API Level 1

 

API级别1

 

* see also:

 

* 另见:

 

<permission> 

<permission-group> 

<uses-permission>

 

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/


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值