aboutsummaryrefslogtreecommitdiff
path: root/testapps/gridlayoutTest/v7-gridlayout/res/values/attrs.xml
blob: ad2ef4e4cfa5186e4aea973bb81976e924ac125f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <declare-styleable name="GridLayout">

        <!--
              support versions. All attributes not present in ViewGroup/View are
              redefined in the support library namespace.
        -->


        <!--
        The orientation property is not used during layout. It is only used to
        allocate row and column parameters when they are not specified by its children's
        layout parameters. GridLayout works like LinearLayout in this case;
        putting all the components either in a single row or in a single column -
        depending on the value of this flag. In the horizontal case, a columnCount
        property may be additionally supplied to force new rows to be created when a
        row is full. The rowCount attribute may be used similarly in the vertical case.
        The default is horizontal.
        -->
        <attr name="orientation">

            <!-- Defines an horizontal widget. -->
            <enum name="horizontal" value="0" />
            <!-- Defines a vertical widget. -->
            <enum name="vertical" value="1" />
        </attr>
        <!-- The maximum number of rows to create when automatically positioning children. -->
        <attr name="rowCount" format="integer" />
        <!-- The maximum number of columns to create when automatically positioning children. -->
        <attr name="columnCount" format="integer" />
        <!--
        When set to true, tells GridLayout to use default margins when none are specified
        in a view's layout parameters.
        The default value is false.
        See {@link android.widget.GridLayout#setUseDefaultMargins(boolean)}.
        -->
        <attr name="useDefaultMargins" format="boolean" />
        <!--
        When set to alignMargins, causes alignment to take place between the outer
        boundary of a view, as defined by its margins. When set to alignBounds,
        causes alignment to take place between the edges of the view.
        The default is alignMargins.
        See {@link android.widget.GridLayout#setAlignmentMode(int)}.
        -->
        <attr name="alignmentMode">

            <!--
            Align the bounds of the children.
            See {@link android.widget.GridLayout#ALIGN_BOUNDS}.
            -->
            <enum name="alignBounds" value="0" />
            <!--
            Align the margins of the children.
            See {@link android.widget.GridLayout#ALIGN_MARGINS}.
            -->
            <enum name="alignMargins" value="1" />
        </attr>
        <!--
        When set to true, forces row boundaries to appear in the same order
        as row indices.
        The default is true.
        See {@link android.widget.GridLayout#setRowOrderPreserved(boolean)}.
        -->
        <attr name="rowOrderPreserved" format="boolean" />
        <!--
        When set to true, forces column boundaries to appear in the same order
        as column indices.
        The default is true.
        See {@link android.widget.GridLayout#setColumnOrderPreserved(boolean)}.
        -->
        <attr name="columnOrderPreserved" format="boolean" />
    </declare-styleable>
    <declare-styleable name="GridLayout_Layout">

        <!--
              support versions. All attributes not present in MarginLayout are
              redefined in the support library name space.
        -->


        <!-- START MarginLayout layoutparams -->

        <attr name="android:layout_width" />
        <attr name="android:layout_height" />
        <!--
              Specifies extra space on the left, top, right and bottom
              sides of this view. This space is outside this view's bounds.
        -->
        <attr name="android:layout_margin" />
        <!--
              Specifies extra space on the left side of this view.
              This space is outside this view's bounds.
        -->
        <attr name="android:layout_marginLeft" />
        <!--
              Specifies extra space on the top side of this view.
              This space is outside this view's bounds.
        -->
        <attr name="android:layout_marginTop" />
        <!--
              Specifies extra space on the right side of this view.
              This space is outside this view's bounds.
        -->
        <attr name="android:layout_marginRight" />
        <!--
              Specifies extra space on the bottom side of this view.
              This space is outside this view's bounds.
        -->
        <attr name="android:layout_marginBottom" />
        <!--
              Specifies extra space on the start side of this view.
              This space is outside this view's bounds.
        -->
        <attr name="android:layout_marginStart" />
        <!--
              Specifies extra space on the end side of this view.
              This space is outside this view's bounds.
        -->
        <attr name="android:layout_marginEnd" />

        <!-- END MarginLayout layoutparams -->


        <!--
        The row boundary delimiting the top of the group of cells
        occupied by this view.
        -->
        <attr name="layout_row" format="integer" />
        <!--
        The row span: the difference between the bottom and top
        boundaries delimiting the group of cells occupied by this view.
        The default is one.
        See {@link android.widget.GridLayout.Spec}.
        -->
        <attr name="layout_rowSpan" format="integer" min="1" />
        <!--
        The column boundary delimiting the left of the group of cells
        occupied by this view.
        -->
        <attr name="layout_column" format="integer" />
        <!--
        The column span: the difference between the right and left
        boundaries delimiting the group of cells occupied by this view.
        The default is one.
        See {@link android.widget.GridLayout.Spec}.
        -->
        <attr name="layout_columnSpan" format="integer" min="1" />
        <!--
        Gravity specifies how a component should be placed in its group of cells.
        The default is LEFT | BASELINE.
        See {@link android.widget.GridLayout.LayoutParams#setGravity(int)}.
        -->
        <attr name="layout_gravity">

            <!-- Push object to the top of its container, not changing its size. -->
            <flag name="top" value="0x30" />
            <!-- Push object to the bottom of its container, not changing its size. -->
            <flag name="bottom" value="0x50" />
            <!-- Push object to the left of its container, not changing its size. -->
            <flag name="left" value="0x03" />
            <!-- Push object to the right of its container, not changing its size. -->
            <flag name="right" value="0x05" />
            <!-- Place object in the vertical center of its container, not changing its size. -->
            <flag name="center_vertical" value="0x10" />
            <!-- Grow the vertical size of the object if needed so it completely fills its container. -->
            <flag name="fill_vertical" value="0x70" />
            <!-- Place object in the horizontal center of its container, not changing its size. -->
            <flag name="center_horizontal" value="0x01" />
            <!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
            <flag name="fill_horizontal" value="0x07" />
            <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. -->
            <flag name="center" value="0x11" />
            <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. -->
            <flag name="fill" value="0x77" />
            <!--
             Additional option that can be set to have the top and/or bottom edges of
             the child clipped to its container's bounds.
             The clip will be based on the vertical gravity: a top gravity will clip the bottom
             edge, a bottom gravity will clip the top edge, and neither will clip both edges.
            -->
            <flag name="clip_vertical" value="0x80" />
            <!--
             Additional option that can be set to have the left and/or right edges of
             the child clipped to its container's bounds.
             The clip will be based on the horizontal gravity: a left gravity will clip the right
             edge, a right gravity will clip the left edge, and neither will clip both edges.
            -->
            <flag name="clip_horizontal" value="0x08" />
            <!-- Push object to the beginning of its container, not changing its size. -->
            <flag name="start" value="0x00800003" />
            <!-- Push object to the end of its container, not changing its size. -->
            <flag name="end" value="0x00800005" />
        </attr>
    </declare-styleable>

</resources>