- ไวยากรณ์:
<permission-group android:description="string resource" android:icon="drawable resource" android:label="string resource" android:name="string" />
- ที่อยู่ใน:
<manifest>
- description:
- ประกาศชื่อสำหรับการจัดกลุ่มสิทธิ์ที่เกี่ยวข้องอย่างมีตรรกะ รายบุคคล
สิทธิ์เข้าร่วมกลุ่มผ่านแอตทริบิวต์
permissionGroup
องค์ประกอบ<permission>
สมาชิกของกลุ่ม แสดงร่วมกันในอินเทอร์เฟซผู้ใช้องค์ประกอบนี้จะไม่ประกาศสิทธิ์ แต่มีเพียงหมวดหมู่ที่วางสิทธิ์ได้เท่านั้น สำหรับข้อมูลเกี่ยวกับการประกาศสิทธิ์และการกำหนดสิทธิ์ให้กับกลุ่ม โปรดดูที่ องค์ประกอบ
<permission>
- ดังนี้
android:description
- ข้อความที่ผู้ใช้อ่านได้ซึ่งอธิบายถึงกลุ่ม ข้อความคือ
ยาวกว่าและอธิบายได้ง่ายกว่าป้ายกำกับ แอตทริบิวต์นี้ต้องเป็น
ตั้งเป็นการอ้างอิงทรัพยากรสตริง เลิกชอบ
label
จะต้องไม่ใช่สตริงดิบ android:icon
- ไอคอนที่แสดงถึงสิทธิ์ ต้องตั้งค่าแอตทริบิวต์นี้ เป็นการอ้างอิงไปยังทรัพยากรที่ถอนออกได้ที่มีคำจำกัดความของรูปภาพ
android:label
- ชื่อที่ผู้ใช้อ่านได้สำหรับกลุ่ม เพื่อความสะดวก ป้ายกำกับ สามารถตั้งค่าเป็นสตริงดิบได้โดยตรงในขณะที่คุณกำลังพัฒนาแอปพลิเคชัน แต่เมื่อแอปพลิเคชันพร้อมที่จะเผยแพร่แล้ว ให้ตั้งค่า เป็นการอ้างอิงไปยังทรัพยากรสตริง เพื่อที่จะสามารถแปลได้เช่นเดียวกับอื่นๆ สตริงในอินเทอร์เฟซผู้ใช้
android:name
- ชื่อกลุ่ม นี่คือชื่อที่สามารถกำหนดให้กับ
<permission>
ขององค์ประกอบ วันที่android:permissionGroup
- เปิดตัวใน
- API ระดับ 1
- ดูเพิ่มเติม
<permission>
<permission-tree>
<uses-permission>
<permission-group>
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],null,["# <permission-group\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cpermission-group android:description=\"string resource\"\n 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 a name for a logical grouping of related permissions. Individual\n permissions join the group through the `permissionGroup` attribute of the\n [\u003cpermission\u003e](/guide/topics/manifest/permission-element) element. Members of a group are\n presented together in the user interface.\n\n\n This element doesn't declare a permission itself, only a category in which permissions can be placed.\n For information about declaring permissions and assigning them to groups, see the\n [\u003cpermission\u003e](/guide/topics/manifest/permission-element) element.\n\nattributes:\n:\n\n `android:description`\n : User-readable text that describes the group. The text is\n longer and more explanatory than the label. This attribute must be\n set as a reference to a string resource. Unlike the `label`\n attribute, it can't be a raw string.\n\n `android:icon`\n : An icon representing the permission. This attribute must be set\n as a reference to a drawable resource containing the image 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 while you're developing the application.\n However, when the application is ready to be published, set it\n as a 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 of the group. This is the name that can be assigned to a\n [\u003cpermission\u003e](/guide/topics/manifest/permission-element)\n element's\n [android:permissionGroup](/guide/topics/manifest/permission-element#pgroup)\n attribute.\n\nintroduced in:\n: API level 1\n\nsee also:\n: [\u003cpermission\u003e](/guide/topics/manifest/permission-element)\n\n [\u003cpermission-tree\u003e](/guide/topics/manifest/permission-tree-element)\n\n [\u003cuses-permission\u003e](/guide/topics/manifest/uses-permission-element)"]]