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 ?
Asked
Active
Viewed 604 times
1

Kara
- 6,115
- 16
- 50
- 57

Sandeep Chikhale
- 1,505
- 2
- 21
- 36
1 Answers
3
Take a look at the screenshot below
[1
We 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));

tehhowch
- 9,645
- 4
- 24
- 42

Michael Melo
- 256
- 1
- 4