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
Display cards and dialogs in
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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
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 |
Name |
Description |
values |
Iterable<? extends com.google.apps.card.v1.Columns.Column>
|
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;
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;
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;
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;
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;
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 |
Name |
Description |
index |
int
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Columns.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
buildPartial()
public Columns buildPartial()
clear()
public Columns.Builder clear()
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;
clearField(Descriptors.FieldDescriptor field)
public Columns.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Columns.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public Columns.Builder clone()
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 |
Name |
Description |
index |
int
|
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 |
Name |
Description |
index |
int
|
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;
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 |
Type |
Description |
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;
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 |
Name |
Description |
index |
int
|
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 |
Type |
Description |
List<? extends com.google.apps.card.v1.Columns.ColumnOrBuilder> |
|
getDefaultInstanceForType()
public Columns getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(Columns other)
public Columns.Builder mergeFrom(Columns other)
Parameter |
Name |
Description |
other |
Columns
|
public Columns.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public Columns.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Columns.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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 |
Name |
Description |
index |
int
|
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;
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;
setField(Descriptors.FieldDescriptor field, Object value)
public Columns.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Columns.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Columns.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides