Class FixedFooter
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
FixedFooter
Die feste Fußzeile, die unten in einer Card
angezeigt wird.
Verfügbar für Google Workspace-Add-ons und Google Chat-Apps.
const fixedFooter = CardService.newFixedFooter().setPrimaryButton(
CardService.newTextButton().setText('help').setOpenLink(
CardService.newOpenLink().setUrl('http://www.google.com')),
);
Detaillierte Dokumentation
Legen Sie die primäre Schaltfläche in der fixierten Fußzeile fest. Die primäre Schaltfläche muss eine TextButtonStyle.FILLED
-Schaltfläche sein. Wenn die Hintergrundfarbe für die primäre Schaltfläche nicht festgelegt ist, wird die im manifest des Add-ons definierte primäre Farbe verwendet.
Parameter
Name | Typ | Beschreibung |
button | TextButton | Die Schaltfläche, die hinzugefügt werden soll. |
Rückflug
FixedFooter
– dieses Objekt, zur Verkettung
Legen Sie die sekundäre Schaltfläche in der fixen Fußzeile fest. Die sekundäre Schaltfläche muss eine TextButtonStyle.OUTLINED
-Schaltfläche sein. Diese Methode führt nichts aus, wenn setPrimaryButton(button)
nicht aufgerufen wird, um die primäre Schaltfläche festzulegen.
Parameter
Name | Typ | Beschreibung |
button | TextButton | Die Schaltfläche, die hinzugefügt werden soll. |
Rückflug
FixedFooter
– dieses Objekt, zur Verkettung
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[[["\u003cp\u003eA FixedFooter is displayed at the bottom of a Card in Google Workspace Add-ons and Google Chat apps.\u003c/p\u003e\n"],["\u003cp\u003eIt can contain a primary button (required) and an optional secondary button for user interaction.\u003c/p\u003e\n"],["\u003cp\u003ePrimary buttons have a filled style while secondary buttons have an outlined style.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can customize button actions, such as opening a link, using the \u003ccode\u003esetPrimaryButton\u003c/code\u003e and \u003ccode\u003esetSecondaryButton\u003c/code\u003e methods.\u003c/p\u003e\n"]]],["The `FixedFooter` feature, available in Google Workspace add-ons and Google Chat apps, allows setting buttons at the bottom of a card. You can set a `primaryButton` using `setPrimaryButton()`, which requires a `TextButtonStyle.FILLED` button. Optionally, a `secondaryButton` can be added via `setSecondaryButton()`, using a `TextButtonStyle.OUTLINED` button. Setting a secondary button is only effective if a primary button is set first. Both methods return the `FixedFooter` object for chaining.\n"],null,["# Class FixedFooter\n\nFixedFooter\n\nThe fixed footer shown at the bottom of a [Card](/apps-script/reference/card-service/card).\n\nAvailable for Google Workspace add-ons and Google Chat apps.\n\n```javascript\nconst fixedFooter = CardService.newFixedFooter().setPrimaryButton(\n CardService.newTextButton().setText('help').setOpenLink(\n CardService.newOpenLink().setUrl('http://www.google.com')),\n);\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------------|------------------|-----------------------------------------------|\n| [setPrimaryButton(button)](#setPrimaryButton(TextButton)) | [FixedFooter](#) | Set the primary button in the fixed footer. |\n| [setSecondaryButton(button)](#setSecondaryButton(TextButton)) | [FixedFooter](#) | Set the secondary button in the fixed footer. |\n\nDetailed documentation\n----------------------\n\n### `set``Primary``Button(button)`\n\nSet the primary button in the fixed footer. The primary button must be a [TextButtonStyle.FILLED](/apps-script/reference/card-service/text-button-style#FILLED) button. If the background color is unset for the primary button, the\nbutton uses the primary color defined in the add-on [manifest](/gmail/add-ons/concepts/manifests#manifest_structure_for_gmail_add-ons).\n\n#### Parameters\n\n| Name | Type | Description |\n|----------|---------------------------------------------------------------|--------------------|\n| `button` | [TextButton](/apps-script/reference/card-service/text-button) | The button to add. |\n\n#### Return\n\n\n[FixedFooter](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `set``Secondary``Button(button)`\n\nSet the secondary button in the fixed footer. The secondary button must be a [TextButtonStyle.OUTLINED](/apps-script/reference/card-service/text-button-style#OUTLINED) button. This method does nothing if [setPrimaryButton(button)](#setPrimaryButton(TextButton)) isn't called to set the primary button.\n\n#### Parameters\n\n| Name | Type | Description |\n|----------|---------------------------------------------------------------|--------------------|\n| `button` | [TextButton](/apps-script/reference/card-service/text-button) | The button to add. |\n\n#### Return\n\n\n[FixedFooter](#) --- This object, for chaining."]]