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() | String | تُطبع تمثيل JSON لهذا الكائن. |
مستندات تفصيلية
printJson()
تُطبع تمثيل JSON لهذا الكائن. يُستخدم هذا الخيار لتصحيح الأخطاء فقط.
الإرجاع
String
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eCards provide single views in the UI and are built using sections.\u003c/p\u003e\n"],["\u003cp\u003eCards can have names, headers, and sections added.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eprintJson()\u003c/code\u003e method is available for debugging the card's JSON representation.\u003c/p\u003e\n"]]],["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"],null,["# Class Card\n\nCard\n\nA context [card](/gmail/add-ons/concepts/cards) that represents a single view in the\nUI.\n\n```javascript\nconst cardSection = CardService.newCardSection();\n// Finish building the card section ...\n\nconst card = CardService.newCardBuilder()\n .setName('Card name')\n .setHeader(CardService.newCardHeader().setTitle('Card title'))\n .addSection(cardSection)\n .build();\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|-----------------------------|-------------|------------------------------------------------|\n| [printJson()](#printJson()) | `String` | Prints the JSON representation of this object. |\n\nDetailed documentation\n----------------------\n\n### `print``Json()`\n\nPrints the JSON representation of this object. This is for debugging only.\n\n#### Return\n\n\n`String`"]]