Class Card
卡片
表示界面中单个视图的情境卡片。
const cardSection = CardService.newCardSection();
// Finish building the card section ...
const card = CardService.newCardBuilder()
.setName('Card name')
.setHeader(CardService.newCardHeader().setTitle('Card title'))
.addSection(cardSection)
.build();
详细文档
printJson()
输出此对象的 JSON 表示法。这仅用于调试。
返回
String
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-21。
[null,null,["最后更新时间 (UTC):2024-12-21。"],[[["Cards provide single views in the UI and are built using sections."],["Cards can have names, headers, and sections added."],["A `printJson()` method is available for debugging the card's JSON representation."]]],["A `Card` is a UI element representing a single view, built using `CardService`. The process involves creating a `CardSection`, then a `Card` builder. The builder sets the `Card`'s name, header, and adds the `CardSection`. Finally, the `Card` is built. The `printJson()` method returns a JSON string representation of the `Card` for debugging. This method is intended for debugging purposes only.\n"]]