Enum InputType
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
InputType
Một enum xác định loại dữ liệu đầu vào của tiện ích.
InputType.TEXT
có nghĩa là dữ liệu đầu vào chấp nhận văn bản thông thường bao gồm tất cả các ký tự.
InputType.INTEGER
có nghĩa là dữ liệu đầu vào chấp nhận một số nguyên.
InputType.FLOAT
có nghĩa là dữ liệu đầu vào chấp nhận số dấu phẩy động.
InputType.EMAIL
có nghĩa là dữ liệu đầu vào chấp nhận địa chỉ email.
Để gọi một enum, bạn gọi lớp mẹ, tên và thuộc tính của enum đó. Ví dụ:
CardService.InputType.INTEGER
.
Thuộc tính
Thuộc tính | Loại | Mô tả |
TEXT | Enum | Chấp nhận văn bản thông thường. |
INTEGER | Enum | Chấp nhận số nguyên. |
FLOAT | Enum | Chấp nhận số có dấu phẩy động. |
EMAIL | Enum | Chấp nhận địa chỉ email. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eInputType is an enum defining the accepted input type for a widget, such as text, integer, float, or email.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize an enum, reference its parent class, name, and property, for instance: \u003ccode\u003eCardService.InputType.INTEGER\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis feature is currently in Developer Preview and accessible through the Google Workspace Developer Preview Program.\u003c/p\u003e\n"]]],["`InputType` is an enum defining acceptable input types for a widget. It includes `TEXT` for all characters, `INTEGER` for whole numbers, `FLOAT` for decimal numbers, and `EMAIL` for email addresses. Each type is called using its parent class, name, and property, like `CardService.InputType.INTEGER`. This feature is part of the Google Workspace Developer Preview Program. Each Input Type Property can be referenced in a table to explain it in detail, such as Type, and Description.\n"],null,["# Enum InputType\n\nInputType\n\nAn enum that defines the input type of the widget.\n\n\n`Input``Type.TEXT` means that the input accepts regular text including all characters.\n\n\n`Input``Type.INTEGER` means that the input accepts an integer.\n\n\n`Input``Type.FLOAT` means that the input accepts a floating-point number.\n\n\n`Input``Type.EMAIL` means that the input accepts an email address.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.InputType.INTEGER`.\n\n\n| **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features.\n\n\u003cbr /\u003e\n\n### Properties\n\n| Property | Type | Description |\n|-----------|--------|---------------------------------|\n| `TEXT` | `Enum` | Accept regular text. |\n| `INTEGER` | `Enum` | Accept an integer. |\n| `FLOAT` | `Enum` | Accept a floating-point number. |\n| `EMAIL` | `Enum` | Accept an email address. |"]]