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 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.
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.
1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 |
# File 'proto_docs/google/apps/card/v1/card.rb', line 1741 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): # Columns for Google Workspace Add-ons are in # Developer Preview. # @!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): # Columns for Google Workspace Add-ons are in # Developer Preview. # @!attribute [rw] text_paragraph # @return [::Google::Apps::Card::V1::TextParagraph] # {::Google::Apps::Card::V1::TextParagraph TextParagraph} widget. # @!attribute [rw] image # @return [::Google::Apps::Card::V1::Image] # {::Google::Apps::Card::V1::Image Image} widget. # @!attribute [rw] decorated_text # @return [::Google::Apps::Card::V1::DecoratedText] # {::Google::Apps::Card::V1::DecoratedText DecoratedText} widget. # @!attribute [rw] button_list # @return [::Google::Apps::Card::V1::ButtonList] # {::Google::Apps::Card::V1::ButtonList ButtonList} widget. # @!attribute [rw] text_input # @return [::Google::Apps::Card::V1::TextInput] # {::Google::Apps::Card::V1::TextInput TextInput} widget. # @!attribute [rw] selection_input # @return [::Google::Apps::Card::V1::SelectionInput] # {::Google::Apps::Card::V1::SelectionInput SelectionInput} widget. # @!attribute [rw] date_time_picker # @return [::Google::Apps::Card::V1::DateTimePicker] # {::Google::Apps::Card::V1::DateTimePicker DateTimePicker} widget. 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): # Columns for Google Workspace Add-ons are in # Developer Preview. 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): # Columns for Google Workspace Add-ons are in # Developer Preview. 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 |