问题
I am creating a gmail add on -
Requirement
I want to include a button and key value add-on on the same row -
Status
Currently only one widget can be shown on 1 line
Is there any way to show two widgets side by side ?
回答1:
Take a look at the screenshot below
[
1We got around this by adding a setOnClickAction and setButton method on a key value pair.
Both "Activities" and "+New" are clickable and perform different actions.
activitiesListSection.addWidget(CardService.newKeyValue()
.setContent("<b>Activities</b>")
.setOnClickAction(saveAction)
.setButton(CardService.newTextButton()
.setText("+ New")
.setOnClickAction(saveAction))
.setIcon(CardService.Icon.DESCRIPTION));
来源:https://stackoverflow.com/questions/50268166/any-way-to-show-two-widget-side-by-side-in-gmail-add-on