Class ListContainer Stay organized with collections Save and categorize content based on your preferences.
Container for list items, where each list item can contain multipleText. *
Only available for Google Workspace add-ons that extend Google Workspace Studio.
constlistContainer=AddOnsResponseService.newListContainer().setListType(AddOnsResponseService.ListType.UNORDERED).addListItem(AddOnsResponseService.newListItem().addTextFormatElement(AddOnsResponseService.newTextFormatElement().setStyledText(sampleStyledText)));
Methods
| Method | Return type | Brief description |
|---|---|---|
add | List | Adds a list item to the list container. |
set | List | Sets the level of the list, starts from 0 for the top level, and increases by 1 for each nestedlist. |
set | List | Sets the type of the list to be ordered or unordered. |
Detailed documentation
addListItem(listItem)
Adds a list item to the list container.
Parameters
| Name | Type | Description |
|---|---|---|
list | List | TheList to be added to the list container. |
Return
List — This list container object, for chaining.
setListNestLevel(listLevel)
Sets the level of the list, starts from 0 for the top level, and increases by 1 for each nestedlist.
Parameters
| Name | Type | Description |
|---|---|---|
list | Integer | The number of nest levels of the list. |
Return
List — This list container object, for chaining.
setListType(listType)
Sets the type of the list to be ordered or unordered.
Parameters
| Name | Type | Description |
|---|---|---|
list | List | TheList of the list. |
Return
List — This list container object, for chaining.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-03 UTC.