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        <!-- END MarginLayout layoutparams -->
114
115        <!--
116        The row boundary delimiting the top of the group of cells
117        occupied by this view.
118        -->
119        <attr name="layout_row" format="integer" />
120        <!--
121        The row span: the difference between the top and bottom
122        boundaries delimiting the group of cells occupied by this view.
123        The default is one.
124        See {@link android.widget.GridLayout.Spec}.
125        -->
126        <attr name="layout_rowSpan" format="integer" min="1" />
127        <!-- The relative proportion of vertical space that should be allocated to this view
128        during excess space distribution. -->
129        <attr name="layout_rowWeight" format="float" />
130        <!--
131        The column boundary delimiting the left of the group of cells
132        occupied by this view.
133        -->
134        <attr name="layout_column" format="integer" />
135        <!--
136        The column span: the difference between the right and left
137        boundaries delimiting the group of cells occupied by this view.
138        The default is one.
139        See {@link android.widget.GridLayout.Spec}.
140        -->
141        <attr name="layout_columnSpan" format="integer" min="1" />
142        <!-- The relative proportion of horizontal space that should be allocated to this view
143        during excess space distribution. -->
144        <attr name="layout_columnWeight" format="float" />
145        <!--
146        Gravity specifies how a component should be placed in its group of cells.
147        The default is LEFT | BASELINE.
148        See {@link android.widget.GridLayout.LayoutParams#setGravity(int)}.
149        -->
150        <attr name="layout_gravity">
151
152            <!-- Push object to the top of its container, not changing its size. -->
153            <flag name="top" value="0x30" />
154            <!-- Push object to the bottom of its container, not changing its size. -->
155            <flag name="bottom" value="0x50" />
156            <!-- Push object to the left of its container, not changing its size. -->
157            <flag name="left" value="0x03" />
158            <!-- Push object to the right of its container, not changing its size. -->
159            <flag name="right" value="0x05" />
160            <!-- Place object in the vertical center of its container, not changing its size. -->
161            <flag name="center_vertical" value="0x10" />
162            <!-- Grow the vertical size of the object if needed so it completely fills its container. -->
163            <flag name="fill_vertical" value="0x70" />
164            <!-- Place object in the horizontal center of its container, not changing its size. -->
165            <flag name="center_horizontal" value="0x01" />
166            <!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
167            <flag name="fill_horizontal" value="0x07" />
168            <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. -->
169            <flag name="center" value="0x11" />
170            <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. -->
171            <flag name="fill" value="0x77" />
172            <!--
173             Additional option that can be set to have the top and/or bottom edges of
174             the child clipped to its container's bounds.
175             The clip will be based on the vertical gravity: a top gravity will clip the bottom
176             edge, a bottom gravity will clip the top edge, and neither will clip both edges.
177            -->
178            <flag name="clip_vertical" value="0x80" />
179            <!--
180             Additional option that can be set to have the left and/or right edges of
181             the child clipped to its container's bounds.
182             The clip will be based on the horizontal gravity: a left gravity will clip the right
183             edge, a right gravity will clip the left edge, and neither will clip both edges.
184            -->
185            <flag name="clip_horizontal" value="0x08" />
186            <!-- Push object to the beginning of its container, not changing its size. -->
187            <flag name="start" value="0x00800003" />
188            <!-- Push object to the end of its container, not changing its size. -->
189            <flag name="end" value="0x00800005" />
190        </attr>
191    </declare-styleable>
192
193</resources>