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.
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 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 |
# File 'proto_docs/google/apps/card/v1/card.rb', line 1777 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. # # Note: The following fields are mutually exclusive: `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. # @!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`. 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`. 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`. 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`. 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`. 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`. 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): # 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 |