xref: /aosp_15_r20/prebuilts/sdk/current/support/v7/gridlayout/res/values/values.xml (revision 344a7f5ef16c479e7a7f54ee6567a9d112f9e72b)
1<?xml version="1.0" encoding="utf-8"?>
2<resources>
3    <declare-styleable name="GridLayout">
4
5        <!--
6              support versions. All attributes not present in ViewGroup/View are
7              redefined in the support library namespace.
8        -->
9
10
11        <!--
12        The orientation property is not used during layout. It is only used to
13        allocate row and column parameters when they are not specified by its children's
14        layout parameters. GridLayout works like LinearLayout in this case;
15        putting all the components either in a single row or in a single column -
16        depending on the value of this flag. In the horizontal case, a columnCount
17        property may be additionally supplied to force new rows to be created when a
18        row is full. The rowCount attribute may be used similarly in the vertical case.
19        The default is horizontal.
20        -->
21        <attr name="orientation">
22
23            <!-- Defines an horizontal widget. -->
24            <enum name="horizontal" value="0"/>
25            <!-- Defines a vertical widget. -->
26            <enum name="vertical" value="1"/>
27        </attr>
28        <!-- The maximum number of rows to create when automatically positioning children. -->
29        <attr format="integer" name="rowCount"/>
30        <!-- The maximum number of columns to create when automatically positioning children. -->
31        <attr format="integer" name="columnCount"/>
32        <!--
33        When set to true, tells GridLayout to use default margins when none are specified
34        in a view's layout parameters.
35        The default value is false.
36        See {@link android.widget.GridLayout#setUseDefaultMargins(boolean)}.
37        -->
38        <attr format="boolean" name="useDefaultMargins"/>
39        <!--
40        When set to alignMargins, causes alignment to take place between the outer
41        boundary of a view, as defined by its margins. When set to alignBounds,
42        causes alignment to take place between the edges of the view.
43        The default is alignMargins.
44        See {@link android.widget.GridLayout#setAlignmentMode(int)}.
45        -->
46        <attr name="alignmentMode">
47
48            <!--
49            Align the bounds of the children.
50            See {@link android.widget.GridLayout#ALIGN_BOUNDS}.
51            -->
52            <enum name="alignBounds" value="0"/>
53            <!--
54            Align the margins of the children.
55            See {@link android.widget.GridLayout#ALIGN_MARGINS}.
56            -->
57            <enum name="alignMargins" value="1"/>
58        </attr>
59        <!--
60        When set to true, forces row boundaries to appear in the same order
61        as row indices.
62        The default is true.
63        See {@link android.widget.GridLayout#setRowOrderPreserved(boolean)}.
64        -->
65        <attr format="boolean" name="rowOrderPreserved"/>
66        <!--
67        When set to true, forces column boundaries to appear in the same order
68        as column indices.
69        The default is true.
70        See {@link android.widget.GridLayout#setColumnOrderPreserved(boolean)}.
71        -->
72        <attr format="boolean" name="columnOrderPreserved"/>
73    </declare-styleable>
74    <declare-styleable name="GridLayout_Layout">
75
76        <!--
77              support versions. All attributes not present in MarginLayout are
78              redefined in the support library name space.
79        -->
80
81
82        <!-- START MarginLayout layoutparams -->
83
84        <attr name="android:layout_width"/>
85        <attr name="android:layout_height"/>
86        <!--
87              Specifies extra space on the left, top, right and bottom
88              sides of this view. This space is outside this view's bounds.
89        -->
90        <attr name="android:layout_margin"/>
91        <!--
92              Specifies extra space on the left side of this view.
93              This space is outside this view's bounds.
94        -->
95        <attr name="android:layout_marginLeft"/>
96        <!--
97              Specifies extra space on the top side of this view.
98              This space is outside this view's bounds.
99        -->
100        <attr name="android:layout_marginTop"/>
101        <!--
102              Specifies extra space on the right side of this view.
103              This space is outside this view's bounds.
104        -->
105        <attr name="android:layout_marginRight"/>
106        <!--
107              Specifies extra space on the bottom side of this view.
108              This space is outside this view's bounds.
109        -->
110        <attr name="android:layout_marginBottom"/>
111
112        <!-- END MarginLayout layoutparams -->
113
114        <!--
115        The row boundary delimiting the top of the group of cells
116        occupied by this view.
117        -->
118        <attr format="integer" name="layout_row"/>
119        <!--
120        The row span: the difference between the top and bottom
121        boundaries delimiting the group of cells occupied by this view.
122        The default is one.
123        See {@link android.widget.GridLayout.Spec}.
124        -->
125        <attr format="integer" min="1" name="layout_rowSpan"/>
126        <!-- The relative proportion of vertical space that should be allocated to this view
127        during excess space distribution. -->
128        <attr format="float" name="layout_rowWeight"/>
129        <!--
130        The column boundary delimiting the left of the group of cells
131        occupied by this view.
132        -->
133        <attr format="integer" name="layout_column"/>
134        <!--
135        The column span: the difference between the right and left
136        boundaries delimiting the group of cells occupied by this view.
137        The default is one.
138        See {@link android.widget.GridLayout.Spec}.
139        -->
140        <attr format="integer" min="1" name="layout_columnSpan"/>
141        <!-- The relative proportion of horizontal space that should be allocated to this view
142        during excess space distribution. -->
143        <attr format="float" name="layout_columnWeight"/>
144        <!--
145        Gravity specifies how a component should be placed in its group of cells.
146        The default is LEFT | BASELINE.
147        See {@link android.widget.GridLayout.LayoutParams#setGravity(int)}.
148        -->
149        <attr name="layout_gravity">
150
151            <!-- Push object to the top of its container, not changing its size. -->
152            <flag name="top" value="0x30"/>
153            <!-- Push object to the bottom of its container, not changing its size. -->
154            <flag name="bottom" value="0x50"/>
155            <!-- Push object to the left of its container, not changing its size. -->
156            <flag name="left" value="0x03"/>
157            <!-- Push object to the right of its container, not changing its size. -->
158            <flag name="right" value="0x05"/>
159            <!-- Place object in the vertical center of its container, not changing its size. -->
160            <flag name="center_vertical" value="0x10"/>
161            <!-- Grow the vertical size of the object if needed so it completely fills its container. -->
162            <flag name="fill_vertical" value="0x70"/>
163            <!-- Place object in the horizontal center of its container, not changing its size. -->
164            <flag name="center_horizontal" value="0x01"/>
165            <!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
166            <flag name="fill_horizontal" value="0x07"/>
167            <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. -->
168            <flag name="center" value="0x11"/>
169            <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. -->
170            <flag name="fill" value="0x77"/>
171            <!--
172             Additional option that can be set to have the top and/or bottom edges of
173             the child clipped to its container's bounds.
174             The clip will be based on the vertical gravity: a top gravity will clip the bottom
175             edge, a bottom gravity will clip the top edge, and neither will clip both edges.
176            -->
177            <flag name="clip_vertical" value="0x80"/>
178            <!--
179             Additional option that can be set to have the left and/or right edges of
180             the child clipped to its container's bounds.
181             The clip will be based on the horizontal gravity: a left gravity will clip the right
182             edge, a right gravity will clip the left edge, and neither will clip both edges.
183            -->
184            <flag name="clip_horizontal" value="0x08"/>
185            <!-- Push object to the beginning of its container, not changing its size. -->
186            <flag name="start" value="0x00800003"/>
187            <!-- Push object to the end of its container, not changing its size. -->
188            <flag name="end" value="0x00800005"/>
189        </attr>
190    </declare-styleable>
191    <dimen name="default_gap">8dip</dimen>
192</resources>