Enum DisplayStyle
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ディスプレイスタイル
カードの表示スタイルを定義する列挙型。
DisplayStyle.REPLACE
は、カードスタック内の一番上のカードのビューを置き換えてカードが表示されることを意味します。
DisplayStyle.PEEK
は、カードのヘッダーがサイドバーの下部に表示され、スタックの現在の一番上のカードが部分的に覆われることを意味します。ヘッダーをクリックすると、カードがカード スタックにポップアップ表示されます。カードにヘッダーがない場合、生成されたヘッダーが代わりに使用されます。
DisplayStyle
は、コンテキスト トリガー関数から返されたカードでのみ機能します。
列挙型を呼び出すには、その親クラス、名前、プロパティを呼び出します。たとえば、
CardService.DisplayStyle.PEEK
です。
プロパティ
プロパティ | タイプ | 説明 |
PEEK | Enum | カード ヘッダーを、既存のコンテンツの上にアドオン コンテンツの下部に表示します。 |
REPLACE | Enum | 既存のコンテンツを置き換えてカードを表示する。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003e\u003ccode\u003eDisplayStyle\u003c/code\u003e is an enum used to define how a card is displayed within the Google Workspace Add-on UI.\u003c/p\u003e\n"],["\u003cp\u003eIt offers two options: \u003ccode\u003eREPLACE\u003c/code\u003e, which replaces the current top card, and \u003ccode\u003ePEEK\u003c/code\u003e, which shows the card header at the bottom, partially overlaying the existing card.\u003c/p\u003e\n"],["\u003cp\u003eThis enum is specifically for cards triggered contextually and has no effect on other types of cards.\u003c/p\u003e\n"],["\u003cp\u003eTo use \u003ccode\u003eDisplayStyle\u003c/code\u003e, you would call it using the syntax \u003ccode\u003eCardService.DisplayStyle.PEEK\u003c/code\u003e or \u003ccode\u003eCardService.DisplayStyle.REPLACE\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Enum DisplayStyle\n\nDisplayStyle\n\nAn enum that defines the display style of card.\n\n\n`Display``Style.REPLACE` means that the card is shown by replacing the view of top card in\nthe card stack.\n\n\n`Display``Style.PEEK` mean that the header of the card appears at the bottom of the\nsidebar, partially covering the current top card of the stack. Clicking the header pops the card\ninto the card stack. If the card has no header, a generated header is used instead.\n\n\n`Display``Style` only works for card returned from contextual trigger function.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.DisplayStyle.PEEK`. \n\n### Properties\n\n| Property | Type | Description |\n|-----------|--------|-----------------------------------------------------------------------------|\n| `PEEK` | `Enum` | Show the card header at the bottom of add-on content over existing content. |\n| `REPLACE` | `Enum` | Show the card by replacing existing content. |"]]