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