Một chế độ điều khiển thu gọn và mở rộng có thể tuỳ chỉnh.
Có sẵn cho các ứng dụng Google Chat. Trong bản dùng thử dành cho nhà phát triển cho tiện ích bổ sung của Google Workspace.
const collapseButton = CardService.newTextButton() .setTextButtonStyle(CardService.TextButtonStyle.BORDERLESS) .setText('Collapse'); const expandButton = CardService.newImageButton() .setImageButtonStyle(CardService.ImageButtonStyle.FILLED); const collapseControl = CardService.newCollapseControl() .setHorizontalAlign(CardService.HorizontalAlignment.END) .setExpandButton(expandButton) .setCollapseButton(collapseButton);
Phương thức
| Phương thức | Kiểu dữ liệu trả về | Mô tả ngắn | 
|---|---|---|
| set | Collapse | Đặt Buttonhiển thị cho nút "ẩn bớt". | 
| set | Collapse | Đặt Buttonhiển thị cho nút "hiển thị thêm". | 
| set | Collapse | Đặt HorizontalcủaCollapse. | 
Tài liệu chi tiết
set
Đặt Button hiển thị cho nút "ẩn bớt". Không bắt buộc. 
Phải được đặt cùng với nút thu gọn.
const collapseButton = CardService.newTextButton().setText('Collapse'); const collapseControl = CardService.newCollapseControl() .setCollapseButton(collapseButton);
Thông số
| Tên | Loại | Mô tả | 
|---|---|---|
| button | Button | Nút thu gọn để thiết lập. | 
Cầu thủ trả bóng
Collapse – Đối tượng này, để tạo chuỗi.
set
Đặt Button hiển thị cho nút "hiển thị thêm". Không bắt buộc. 
Phải được đặt cùng với nút thu gọn.
const expandButton = CardService.newTextButton().setText('Expand'); const collapseControl = CardService.newCollapseControl() .setExpandButton(expandButton);
Thông số
| Tên | Loại | Mô tả | 
|---|---|---|
| button | Button | Nút mở rộng để đặt. | 
Cầu thủ trả bóng
Collapse – Đối tượng này, để tạo chuỗi.
set
Đặt Horizontal của Collapse. Không bắt buộc. *
const collapseControl = CardService.newCollapseControl().setHorizontalAlign( CardService.HorizontalAlignment.START, );
Thông số
| Tên | Loại | Mô tả | 
|---|---|---|
| horizontal | Horizontal | Cách căn chỉnh theo chiều ngang của tiện ích CollapseControl. | 
Cầu thủ trả bóng
Collapse – Đối tượng này, để tạo chuỗi.