Class Columns (0.1.0)

public final class Columns extends GeneratedMessageV3 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 Fields

COLUMN_ITEMS_FIELD_NUMBER

public static final int COLUMN_ITEMS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Columns getDefaultInstance()
Returns
TypeDescription
Columns

getDescriptor()

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

newBuilder()

public static Columns.Builder newBuilder()
Returns
TypeDescription
Columns.Builder

newBuilder(Columns prototype)

public static Columns.Builder newBuilder(Columns prototype)
Parameter
NameDescription
prototypeColumns
Returns
TypeDescription
Columns.Builder

parseDelimitedFrom(InputStream input)

public static Columns parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Columns
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Columns parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Columns
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Columns parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Columns
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Columns parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Columns
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Columns parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Columns
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Columns parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Columns
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Columns parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Columns
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Columns parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Columns
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Columns parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Columns
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Columns parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Columns
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Columns parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Columns
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Columns parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Columns
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Columns> parser()
Returns
TypeDescription
Parser<Columns>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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

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

getParserForType()

public Parser<Columns> getParserForType()
Returns
TypeDescription
Parser<Columns>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Columns.Builder newBuilderForType()
Returns
TypeDescription
Columns.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Columns.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Columns.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Columns.Builder toBuilder()
Returns
TypeDescription
Columns.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException