- söz dizimi:
<permission-tree android:icon="drawable resource" android:label="string resource" android:name="string" />
- bulunduğu yer:
<manifest>
- description:
- İzin ağacı için temel adı tanımlar. Uygulama,
tüm adların sahipliğini üstlenmeniz gerekir. Dinamik olarak yeni izinler ekleyebilir
PackageManager.addPermission()
numaralı telefonu arayarak ağaca gönderin. Ağaç içindeki adlar nokta (".
") Örneğin, temel adcom.example.project.taxes
, aşağıdaki gibi izinler olabilir eklendi:com.example.project.taxes.CALCULATE
com.example.project.taxes.deductions.STORE_RECEIPTS
com.example.project.taxes.deductions.ACCESS_RECORDS
Bu öğe bir izni değil, yalnızca bir izni ad alanı gösterilir. İzinleri beyan etme hakkında daha fazla bilgi için bkz.
<permission>
. öğesine dokunun. - özellikler:
android:icon
- Ağaçtaki tüm izinleri temsil eden bir simge. Bu özellik resmi içeren çekilebilir bir kaynağa başvuru olarak ayarlanmalıdır belirler.
android:label
- Grubun kullanıcı tarafından okunabilen adı. Kolaylık olması açısından değeri, geliştirme sırasında doğrudan ham dize olarak ayarlanabilir. Ancak, uygulama yayınlanmaya hazır olduğunda bunu diğer öğeler gibi yerelleştirilebilmesi için bir dize kaynağına referans verir. dizeler halinde çalışır.
android:name
- İzin ağacının alt kısmındaki ad. Şu şekilde hizmet verir:
ağaçtaki tüm izin adlarına bir önek ekler. Java stili kapsam kullanma
Böylece adın benzersiz olması gerekir. Ad, şundan fazla olmalıdır:
yolunun kendisinde, noktayla ayrılmış iki segment bulunmalıdır. Örneğin,
com.example.base
sorun yok ancakcom.example
iyi değil.
- tanıtıldığı yer:
- API düzeyi 1
- ayrıca bkz.:
<permission>
<permission-group>
<uses-permission>
<izin-ağacı>
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],null,["# <permission-tree\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cpermission-tree android:icon=\"drawable resource\"\n android:label=\"string resource\"\n android:name=\"string\" /\u003e\n ```\n\ncontained in:\n: [\u003cmanifest\u003e](/guide/topics/manifest/manifest-element)\n\ndescription:\n: Declares the base name for a tree of permissions. The application takes\n ownership of all names within the tree. It can dynamically add new permissions\n to the tree by calling [PackageManager.addPermission()](/reference/android/content/pm/PackageManager#addPermission(android.content.pm.PermissionInfo)).\n Names within the tree are separated by\n periods ('`.`'). For example, if the base name is\n `com.example.project.taxes`, permissions like the following might be\n added:\n\n `com.example.project.taxes.CALCULATE`\n\n `com.example.project.taxes.deductions.STORE_RECEIPTS`\n\n `com.example.project.taxes.deductions.ACCESS_RECORDS`\n\n\n This element doesn't declare a permission itself, only a\n namespace in which permissions can be placed. For more information about declaring permissions, see the\n [\u003cpermission\u003e](/guide/topics/manifest/permission-element)\n element.\n\nattributes:\n:\n\n `android:icon`\n : An icon representing all the permissions in the tree. This attribute\n must be set as a reference to a drawable resource containing the image\n definition.\n\n `android:label`\n : A user-readable name for the group. As a convenience, the label\n can be directly set as a raw string during development. However,\n when the application is ready to be published, set it as a\n reference to a string resource, so that it can be localized like other\n strings in the user interface.\n\n `android:name`\n : The name at the base of the permission tree. It serves as\n a prefix to all permission names in the tree. Use Java-style scoping\n so that the name is unique. The name must have more than\n two period-separated segments in its path. For example,\n `com.example.base` is OK, but `com.example` isn't.\n\nintroduced in:\n: API level 1\n\nsee also:\n: [\u003cpermission\u003e](/guide/topics/manifest/permission-element)\n\n [\u003cpermission-group\u003e](/guide/topics/manifest/permission-group-element)\n\n [\u003cuses-permission\u003e](/guide/topics/manifest/uses-permission-element)"]]