Class: Google::Apps::Card::V1::Columns
- Inherits:
-
Object
- Object
- Google::Apps::Card::V1::Columns
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/apps/card/v1/card.rb
Overview
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 two columns, or to use rows, use the
Grid widget.
Google Workspace add-ons and Chat apps: The add-on UIs that support columns include:
- The dialog displayed when users open the add-on from an email draft.
- The dialog displayed when users open the add-on from the Add attachment menu in a Google Calendar event.
Defined Under Namespace
Classes: Column
Instance Attribute Summary collapse
-
#column_items ⇒ ::Array<::Google::Apps::Card::V1::Columns::Column>
An array of columns.
Instance Attribute Details
#column_items ⇒ ::Array<::Google::Apps::Card::V1::Columns::Column>
Returns An array of columns. You can include up to 2 columns in a card or dialog.
2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 |
# File 'proto_docs/google/apps/card/v1/card.rb', line 2033 class Columns include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A column. # # [Google Workspace add-ons and Chat # apps](https://developers.google.com/workspace/extend) # @!attribute [rw] horizontal_size_style # @return [::Google::Apps::Card::V1::Columns::Column::HorizontalSizeStyle] # Specifies how a column fills the width of the card. # @!attribute [rw] horizontal_alignment # @return [::Google::Apps::Card::V1::Widget::HorizontalAlignment] # Specifies whether widgets align to the left, right, or center of a # column. # @!attribute [rw] vertical_alignment # @return [::Google::Apps::Card::V1::Columns::Column::VerticalAlignment] # Specifies whether widgets align to the top, bottom, or center of a # column. # @!attribute [rw] widgets # @return [::Array<::Google::Apps::Card::V1::Columns::Column::Widgets>] # An array of widgets included in a column. Widgets appear in the order # that they are specified. class Column include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The supported widgets that you can include in a column. # # [Google Workspace add-ons and Chat # apps](https://developers.google.com/workspace/extend) # @!attribute [rw] text_paragraph # @return [::Google::Apps::Card::V1::TextParagraph] # {::Google::Apps::Card::V1::TextParagraph TextParagraph} widget. # # Note: The following fields are mutually exclusive: `text_paragraph`, `image`, `decorated_text`, `button_list`, `text_input`, `selection_input`, `date_time_picker`, `chip_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] image # @return [::Google::Apps::Card::V1::Image] # {::Google::Apps::Card::V1::Image Image} widget. # # Note: The following fields are mutually exclusive: `image`, `text_paragraph`, `decorated_text`, `button_list`, `text_input`, `selection_input`, `date_time_picker`, `chip_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] decorated_text # @return [::Google::Apps::Card::V1::DecoratedText] # {::Google::Apps::Card::V1::DecoratedText DecoratedText} widget. # # Note: The following fields are mutually exclusive: `decorated_text`, `text_paragraph`, `image`, `button_list`, `text_input`, `selection_input`, `date_time_picker`, `chip_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] button_list # @return [::Google::Apps::Card::V1::ButtonList] # {::Google::Apps::Card::V1::ButtonList ButtonList} widget. # # Note: The following fields are mutually exclusive: `button_list`, `text_paragraph`, `image`, `decorated_text`, `text_input`, `selection_input`, `date_time_picker`, `chip_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] text_input # @return [::Google::Apps::Card::V1::TextInput] # {::Google::Apps::Card::V1::TextInput TextInput} widget. # # Note: The following fields are mutually exclusive: `text_input`, `text_paragraph`, `image`, `decorated_text`, `button_list`, `selection_input`, `date_time_picker`, `chip_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] selection_input # @return [::Google::Apps::Card::V1::SelectionInput] # {::Google::Apps::Card::V1::SelectionInput SelectionInput} widget. # # Note: The following fields are mutually exclusive: `selection_input`, `text_paragraph`, `image`, `decorated_text`, `button_list`, `text_input`, `date_time_picker`, `chip_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] date_time_picker # @return [::Google::Apps::Card::V1::DateTimePicker] # {::Google::Apps::Card::V1::DateTimePicker DateTimePicker} widget. # # Note: The following fields are mutually exclusive: `date_time_picker`, `text_paragraph`, `image`, `decorated_text`, `button_list`, `text_input`, `selection_input`, `chip_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chip_list # @return [::Google::Apps::Card::V1::ChipList] # {::Google::Apps::Card::V1::ChipList ChipList} widget. # # Note: The following fields are mutually exclusive: `chip_list`, `text_paragraph`, `image`, `decorated_text`, `button_list`, `text_input`, `selection_input`, `date_time_picker`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Widgets include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Specifies how a column fills the width of the card. The width of each # column depends on both the `HorizontalSizeStyle` and the width of the # widgets within the column. # # [Google Workspace add-ons and Chat # apps](https://developers.google.com/workspace/extend) module HorizontalSizeStyle # Don't use. Unspecified. HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0 # Default value. Column fills the available space, up to 70% of the # card's width. If both columns are set to `FILL_AVAILABLE_SPACE`, each # column fills 50% of the space. FILL_AVAILABLE_SPACE = 1 # Column fills the least amount of space possible and no more than 30% of # the card's width. FILL_MINIMUM_SPACE = 2 end # Specifies whether widgets align to the top, bottom, or center of a # column. # # [Google Workspace add-ons and Chat # apps](https://developers.google.com/workspace/extend) module VerticalAlignment # Don't use. Unspecified. VERTICAL_ALIGNMENT_UNSPECIFIED = 0 # Default value. Aligns widgets to the center of a column. CENTER = 1 # Aligns widgets to the top of a column. TOP = 2 # Aligns widgets to the bottom of a column. BOTTOM = 3 end end end |