Class Columns.Builder (0.1.0)

public static final class Columns.Builder extends GeneratedMessageV3.Builder<Columns.Builder> implements ColumnsOrBuilder

The Columns widget displays up to 2 columns in a card or dialog. You can add widgets to each column; the widgets appear in the order that they are specified. For an example in Google Chat apps, see Columns.

The height of each column is determined by the taller column. For example, if the first column is taller than the second column, both columns have the height of the first column. Because each column can contain a different number of widgets, you can't define rows or align widgets between the columns.

Columns are displayed side-by-side. You can customize the width of each column using the HorizontalSizeStyle field. If the user's screen width is too narrow, the second column wraps below the first:

  • On web, the second column wraps if the screen width is less than or equal to 480 pixels.
  • On iOS devices, the second column wraps if the screen width is less than or equal to 300 pt.
  • On Android devices, the second column wraps if the screen width is less than or equal to 320 dp.

    To include more than 2 columns, or to use rows, use the Grid widget.

    Google Workspace Add-ons and Chat apps: Columns for Google Workspace Add-ons are in Developer Preview.

Protobuf type google.apps.card.v1.Columns

Implements

ColumnsOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllColumnItems(Iterable<? extends Columns.Column> values)

public Columns.Builder addAllColumnItems(Iterable<? extends Columns.Column> values)

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.apps.card.v1.Columns.Column>
Returns
TypeDescription
Columns.Builder

addColumnItems(Columns.Column value)

public Columns.Builder addColumnItems(Columns.Column value)

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Parameter
NameDescription
valueColumns.Column
Returns
TypeDescription
Columns.Builder

addColumnItems(Columns.Column.Builder builderForValue)

public Columns.Builder addColumnItems(Columns.Column.Builder builderForValue)

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Parameter
NameDescription
builderForValueColumns.Column.Builder
Returns
TypeDescription
Columns.Builder

addColumnItems(int index, Columns.Column value)

public Columns.Builder addColumnItems(int index, Columns.Column value)

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Parameters
NameDescription
indexint
valueColumns.Column
Returns
TypeDescription
Columns.Builder

addColumnItems(int index, Columns.Column.Builder builderForValue)

public Columns.Builder addColumnItems(int index, Columns.Column.Builder builderForValue)

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Parameters
NameDescription
indexint
builderForValueColumns.Column.Builder
Returns
TypeDescription
Columns.Builder

addColumnItemsBuilder()

public Columns.Column.Builder addColumnItemsBuilder()

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Returns
TypeDescription
Columns.Column.Builder

addColumnItemsBuilder(int index)

public Columns.Column.Builder addColumnItemsBuilder(int index)

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Columns.Column.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Columns.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Columns.Builder
Overrides

build()

public Columns build()
Returns
TypeDescription
Columns

buildPartial()

public Columns buildPartial()
Returns
TypeDescription
Columns

clear()

public Columns.Builder clear()
Returns
TypeDescription
Columns.Builder
Overrides

clearColumnItems()

public Columns.Builder clearColumnItems()

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Returns
TypeDescription
Columns.Builder

clearField(Descriptors.FieldDescriptor field)

public Columns.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Columns.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Columns.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Columns.Builder
Overrides

clone()

public Columns.Builder clone()
Returns
TypeDescription
Columns.Builder
Overrides

getColumnItems(int index)

public Columns.Column getColumnItems(int index)

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Columns.Column

getColumnItemsBuilder(int index)

public Columns.Column.Builder getColumnItemsBuilder(int index)

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Columns.Column.Builder

getColumnItemsBuilderList()

public List<Columns.Column.Builder> getColumnItemsBuilderList()

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Returns
TypeDescription
List<Builder>

getColumnItemsCount()

public int getColumnItemsCount()

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Returns
TypeDescription
int

getColumnItemsList()

public List<Columns.Column> getColumnItemsList()

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Returns
TypeDescription
List<Column>

getColumnItemsOrBuilder(int index)

public Columns.ColumnOrBuilder getColumnItemsOrBuilder(int index)

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Columns.ColumnOrBuilder

getColumnItemsOrBuilderList()

public List<? extends Columns.ColumnOrBuilder> getColumnItemsOrBuilderList()

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Returns
TypeDescription
List<? extends com.google.apps.card.v1.Columns.ColumnOrBuilder>

getDefaultInstanceForType()

public Columns getDefaultInstanceForType()
Returns
TypeDescription
Columns

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Columns other)

public Columns.Builder mergeFrom(Columns other)
Parameter
NameDescription
otherColumns
Returns
TypeDescription
Columns.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Columns.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Columns.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Columns.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Columns.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Columns.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Columns.Builder
Overrides

removeColumnItems(int index)

public Columns.Builder removeColumnItems(int index)

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Columns.Builder

setColumnItems(int index, Columns.Column value)

public Columns.Builder setColumnItems(int index, Columns.Column value)

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Parameters
NameDescription
indexint
valueColumns.Column
Returns
TypeDescription
Columns.Builder

setColumnItems(int index, Columns.Column.Builder builderForValue)

public Columns.Builder setColumnItems(int index, Columns.Column.Builder builderForValue)

An array of columns. You can include up to 2 columns in a card or dialog.

repeated .google.apps.card.v1.Columns.Column column_items = 2;

Parameters
NameDescription
indexint
builderForValueColumns.Column.Builder
Returns
TypeDescription
Columns.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Columns.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Columns.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Columns.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Columns.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Columns.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Columns.Builder
Overrides