สลับชิป
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ

ToggleChip เป็นชิปเฉพาะที่อนุญาตให้ผู้ใช้เลือกตัวเลือกต่างๆ
ชิปสลับมีตัวควบคุมแบบ 2 สถานะ ตัวอย่างการควบคุมแบบเปิด/ปิด 2 สถานะ ได้แก่ สวิตช์ ปุ่มตัวเลือก หรือช่องทำเครื่องหมาย ใช้ชิปเปิด/ปิดสำหรับกรณีที่อาจต้องตั้งค่าตัวเลือกหลายรายการอย่างรวดเร็วและง่ายดาย เช่น ในการตั้งค่า
กายวิภาคศาสตร์
ชิปเปิด/ปิดมี 4 ช่องที่รองรับป้ายกำกับข้อความ 2 รายการ การควบคุมการเลือก 1 รายการ และไอคอนแอปพลิเคชัน 1 รายการ คุณจะใส่ไอคอนและป้ายกำกับรองหรือไม่ก็ได้
ก. ป้ายกํากับ
ข. ป้ายกำกับรอง
ค. ไอคอน
ง. การควบคุมการเลือก
จ. คอนเทนเนอร์
สลับการไล่สีชิป
ด้านบน/ซ้าย = พื้นผิว 0%
ด้านล่าง/ขวา = หลัก 50%
(การไล่ระดับสีวางซ้อนบนพื้นหลังสีพื้นผิว)
การควบคุมการเลือก
เปลี่ยน
ใช้สวิตช์เพื่อเปิดหรือปิดรายการที่เลือก
ปุ่มตัวเลือก
ใช้ปุ่มตัวเลือกในรายการที่ผู้ใช้เลือกได้เพียงตัวเลือกเดียว
ช่องทำเครื่องหมาย
ใช้ช่องทำเครื่องหมายในรายการที่ผู้ใช้เลือกตัวเลือกได้หลายรายการ
ชิปสวิตช์แบบแยก
ใช้ชิปสวิตช์แบบแยกเมื่อคุณต้องการพื้นที่ที่แตะได้ 2 พื้นที่
แยก ToggleChips
SplitToggleChip แตกต่างจาก ToggleChip ตรงที่มีพื้นที่ที่แตะได้ 2 พื้นที่ โดยพื้นที่หนึ่งคลิกได้และอีกพื้นที่หนึ่งมีปุ่มเปิด/ปิด
ในชิปสวิตช์แบบแยก ให้แยกความแตกต่างระหว่างพื้นที่พื้นหลังที่แตะได้กับตัวควบคุมสวิตช์โดยทำให้แต่ละส่วนมีสีต่างกัน
การใช้งาน
ใช้ ToggleChips ดังที่แสดงในตัวอย่างต่อไปนี้

เลย์เอาต์ที่ปรับเปลี่ยนได้

ลักษณะการทํางานแบบตอบสนอง
ToggleChip จะยืดให้เต็มความกว้างที่มีในจอแสดงผลขนาดใหญ่
ไอคอน (24 x 24 dp)
คอนเทนเนอร์ (52 x XX dp)
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา 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,["# Toggle chips\n\nA [ToggleChip](/reference/kotlin/androidx/wear/compose/material/package-summary#ToggleChip(kotlin.Boolean,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function1,kotlin.Function1,androidx.wear.compose.material.ToggleChipColors,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.foundation.layout.PaddingValues,androidx.compose.ui.graphics.Shape,kotlin.Function0)) is a specialized chip that allows users to select various options. \nToggle chips include a bi-state toggle control. Some examples of a bi-state toggle control include a switch, radio button, or checkbox. Use toggle chips for situations in which many options may need to be quickly and easily set, such as in Settings.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nAnatomy\n-------\n\nToggle chips have four slots that accommodate two text labels, one selection control and one application icon. The icon and secondary label are optional.\n\n**A. Label\nB. Secondary label\nC. Icon\nD. Selection control\nE. Container**\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nToggle Chips Gradient\n---------------------\n\nTop/Left = 0% Surface \n\nBottom/Right = 50% Primary \n\n(Gradient overlays on a background of Surface color)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nSelection control\n-----------------\n\n**Switch**\n\nUse a switch to turn a selection on or off.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n**Radio button**\n\nUse radio buttons in lists where the user can select only one option.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n**Checkbox**\n\nUse checkboxes in lists where the user can select multiple options.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n**Split toggle chips**\n\nUse split toggle chips when you want two tappable areas.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nRelated components\n------------------\n\n**Split ToggleChips**\n\nThe SplitToggleChip differs from the ToggleChip by having two tappable areas, one clickable and one with the toggle. \n\n\nOn split toggle chips, differentiate between the tappable background area and the toggle control by making each section a different color.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nUsage\n-----\n\nUse ToggleChips as shown in the following examples.\n\nAdaptive layouts\n----------------\n\n**Responsive behavior**\n\nToggleChips stretch to fill the available width on larger displays. \n\n\nIcon (24 x 24 dp) \n\nContainer (52 x XX dp)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]