Enum SelectionInputType
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
SelectionInputType
รูปแบบของรายการที่ผู้ใช้เลือกได้ ตัวเลือกต่างๆ รองรับการโต้ตอบประเภทต่างๆ เช่น ผู้ใช้สามารถเลือกช่องทําเครื่องหมายหลายช่องได้ แต่เลือกได้เพียงรายการเดียวจากเมนูแบบเลื่อนลง
อินพุตการเลือกแต่ละรายการรองรับการเลือก 1 ประเภท เช่น ระบบไม่รองรับการผสมช่องทําเครื่องหมายและสวิตช์
พร้อมใช้งานสำหรับแอป Google Chat และส่วนเสริมของ Google Workspace
หากต้องการเรียกใช้ enum ให้เรียกคลาสหลัก ชื่อ และพร็อพเพอร์ตี้ของ enum นั้น เช่น
CardService.SelectionInput.CHECK_BOX
พร็อพเพอร์ตี้
พร็อพเพอร์ตี้ | ประเภท | คำอธิบาย |
CHECK_BOX | Enum | รูปแบบการป้อนข้อมูลช่องทำเครื่องหมาย ค่าเริ่มต้น |
RADIO_BUTTON | Enum | รูปแบบการป้อนข้อมูลปุ่มตัวเลือก เลือกรายการในกลุ่มได้สูงสุด 1 รายการ |
DROPDOWN | Enum | รูปแบบอินพุตการเลือกเมนูแบบเลื่อนลง |
SWITCH | Enum | ชุดสวิตช์ ผู้ใช้สามารถเปิดสวิตช์อย่างน้อย 1 ตัว |
MULTI_SELECT | Enum | เมนูแบบเลือกหลายรายการสำหรับข้อมูลแบบคงที่หรือแบบไดนามิก |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eSelectionInputType\u003c/code\u003e dictates how users interact with selectable items, such as choosing single or multiple options through checkboxes, radio buttons, dropdowns, switches, or multi-select menus.\u003c/p\u003e\n"],["\u003cp\u003eEach selection input element supports a single selection type, and combining different types like checkboxes and switches within the same element is not allowed.\u003c/p\u003e\n"],["\u003cp\u003eThis feature is available for use in Google Chat apps and Google Workspace Add-ons.\u003c/p\u003e\n"],["\u003cp\u003eTo specify a selection type, use the \u003ccode\u003eCardService.SelectionInput\u003c/code\u003e enum followed by the desired property, for instance, \u003ccode\u003eCardService.SelectionInput.CHECK_BOX\u003c/code\u003e for checkboxes.\u003c/p\u003e\n"]]],["Users can select items in various formats, including `CHECK_BOX`, `RADIO_BUTTON`, `DROPDOWN`, `SWITCH`, and `MULTI_SELECT`. Each selection input supports only one style, and mixing styles is unsupported. Checkboxes and switches allow multiple selections, while radio buttons and dropdowns are limited to single selections. `MULTI_SELECT` is used for multiselect options. This is applicable to Google Chat apps and Google Workspace add-ons. Each selection style can be called by it's parent class, name and property.\n"],null,["# Enum SelectionInputType\n\nSelectionInputType\n\nThe format of the items that users can select. Different options support different types of\ninteractions. For example, users can select multiple checkboxes, but can only select one item\nfrom a dropdown menu.\n\nEach selection input supports one type of selection. Mixing checkboxes and switches, for\nexample, isn't supported.\n\nAvailable for Google Chat apps and Google Workspace add-ons.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.SelectionInput.CHECK_BOX`. \n\n### Properties\n\n| Property | Type | Description |\n|----------------|--------|--------------------------------------------------------------------------|\n| `CHECK_BOX` | `Enum` | Checkbox input style. Default. |\n| `RADIO_BUTTON` | `Enum` | Radio button input style. At most one item in the group can be selected. |\n| `DROPDOWN` | `Enum` | Dropdown menu selection input style. |\n| `SWITCH` | `Enum` | A set of switches. Users can turn on one or more switches. |\n| `MULTI_SELECT` | `Enum` | A multiselect menu for static or dynamic data. |"]]