Send feedback
Class Columns (2.45.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.45.1 keyboard_arrow_down
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
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.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
COLUMN_ITEMS_FIELD_NUMBER
public static final int COLUMN_ITEMS_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
getDefaultInstance()
public static Columns getDefaultInstance ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static Columns . Builder newBuilder ()
newBuilder(Columns prototype)
public static Columns . Builder newBuilder ( Columns prototype )
Parameter
Name
Description
prototype
Columns
public static Columns parseDelimitedFrom ( InputStream input )
public static Columns parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static Columns parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Columns parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static Columns parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Columns parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static Columns parseFrom ( CodedInputStream input )
public static Columns parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static Columns parseFrom ( InputStream input )
public static Columns parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static Columns parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Columns parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<Columns> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
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
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 ()
getParserForType()
public Parser<Columns> getParserForType ()
Overrides
getSerializedSize()
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
hashCode()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public Columns . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Columns . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public Columns . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]