A layout that places its children in a rectangular grid . The grid is composed of a set of infinitely thin lines that separate the viewing area into cells . Throughout the API, grid lines are referenced by grid indices . A grid with N columns has N + 1 gri
| 161 | * @attr ref android.R.styleable#GridLayout_columnOrderPreserved |
| 162 | */ |
| 163 | @RemoteView |
| 164 | public class GridLayout extends ViewGroup { |
| 165 | |
| 166 | // Public constants |
| 167 | |
| 168 | /** |
| 169 | * The horizontal orientation. |
| 170 | */ |
| 171 | public static final int HORIZONTAL = LinearLayout.HORIZONTAL; |
| 172 | |
| 173 | /** |
| 174 | * The vertical orientation. |
| 175 | */ |
| 176 | public static final int VERTICAL = LinearLayout.VERTICAL; |
| 177 | |
| 178 | /** |
| 179 | * The constant used to indicate that a value is undefined. |
| 180 | * Fields can use this value to indicate that their values |
| 181 | * have not yet been set. Similarly, methods can return this value |
| 182 | * to indicate that there is no suitable value that the implementation |
| 183 | * can return. |
| 184 | * The value used for the constant (currently {@link Integer#MIN_VALUE}) is |
| 185 | * intended to avoid confusion between valid values whose sign may not be known. |
| 186 | */ |
| 187 | public static final int UNDEFINED = Integer.MIN_VALUE; |
| 188 | |
| 189 | /** |
| 190 | * This constant is an {@link #setAlignmentMode(int) alignmentMode}. |
| 191 | * When the {@code alignmentMode} is set to {@link #ALIGN_BOUNDS}, alignment |
| 192 | * is made between the edges of each component's raw |
| 193 | * view boundary: i.e. the area delimited by the component's: |
| 194 | * {@link android.view.View#getTop() top}, |
| 195 | * {@link android.view.View#getLeft() left}, |
| 196 | * {@link android.view.View#getBottom() bottom} and |
| 197 | * {@link android.view.View#getRight() right} properties. |
| 198 | * <p> |
| 199 | * For example, when {@code GridLayout} is in {@link #ALIGN_BOUNDS} mode, |
| 200 | * children that belong to a row group that uses {@link #TOP} alignment will |
| 201 | * all return the same value when their {@link android.view.View#getTop()} |
| 202 | * method is called. |
| 203 | * |
| 204 | * @see #setAlignmentMode(int) |
| 205 | */ |
| 206 | public static final int ALIGN_BOUNDS = 0; |
| 207 | |
| 208 | /** |
| 209 | * This constant is an {@link #setAlignmentMode(int) alignmentMode}. |
| 210 | * When the {@code alignmentMode} is set to {@link #ALIGN_MARGINS}, |
| 211 | * the bounds of each view are extended outwards, according |
| 212 | * to their margins, before the edges of the resulting rectangle are aligned. |
| 213 | * <p> |
| 214 | * For example, when {@code GridLayout} is in {@link #ALIGN_MARGINS} mode, |
| 215 | * the quantity {@code top - layoutParams.topMargin} is the same for all children that |
| 216 | * belong to a row group that uses {@link #TOP} alignment. |
| 217 | * |
| 218 | * @see #setAlignmentMode(int) |
| 219 | */ |
| 220 | public static final int ALIGN_MARGINS = 1; |
nothing calls this directly
no test coverage detected