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