Enum DisplayStyle
DisplayStyle
An enum that defines the display style of card.
DisplayStyle.REPLACE
means that the card is shown by replacing the view of top card in
the card stack.
DisplayStyle.PEEK
mean that the header of the card appears at the bottom of the
sidebar, partially covering the current top card of the stack. Clicking the header pops the card
into the card stack. If the card has no header, a generated header is used instead.
DisplayStyle
only works for card returned from contextual trigger function.
To call an enum, you call its parent class, name, and property. For example,
CardService.DisplayStyle.PEEK
.
Properties
Property | Type | Description |
PEEK | Enum | Show the card header at the bottom of add-on content over existing content. |
REPLACE | Enum | Show the card by replacing existing content. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["`DisplayStyle` is an enum used to define how a card is displayed within the Google Workspace Add-on UI."],["It offers two options: `REPLACE`, which replaces the current top card, and `PEEK`, which shows the card header at the bottom, partially overlaying the existing card."],["This enum is specifically for cards triggered contextually and has no effect on other types of cards."],["To use `DisplayStyle`, you would call it using the syntax `CardService.DisplayStyle.PEEK` or `CardService.DisplayStyle.REPLACE`."]]],[]]