Example usage for Java android.widget GridLayout fields, constructors, methods, implement or subclass
The text is from its open source code.
int | HORIZONTAL The horizontal orientation. |
int | VERTICAL The vertical orientation. |
int | UNDEFINED The constant used to indicate that a value is undefined. |
int | ALIGN_BOUNDS This constant is an #setAlignmentMode(int) alignmentMode . |
Alignment | TOP Indicates that a view should be aligned with the top edges of the other views in its cell group. |
Alignment | START Indicates that a view should be aligned with the start edges of the other views in its cell group. |
Alignment | LEFT Indicates that a view should be aligned with the left edges of the other views in its cell group. |
void | addView(View child, int index) Adds a child view. |
void | addView(View child) Adds a child view. |
View | getChildAt(int index) Returns the view at the specified position in the group. |
int | getChildCount() Returns the number of children in the group. |
int | getColumnCount() Returns the current number of columns. |
void | removeAllViews() Call this method to remove all child views from the ViewGroup. |
void | removeView(View view) Note: do not invoke this method from #draw(android.graphics.Canvas) , #onDraw(android.graphics.Canvas) , #dispatchDraw(android.graphics.Canvas) or any related method. |
void | setAlignmentMode(@AlignmentMode int alignmentMode) Sets the alignment mode to be used for all of the alignments between the children of this container. |
void | setBackgroundColor(@ColorInt int color) Sets the background color for this view. |
void | setColumnCount(int columnCount) ColumnCount is used only to generate default column/column indices when they are not specified by a component's layout parameters. |
void | setId(@IdRes int id) Sets the identifier for this view. |
void | setLayoutParams(ViewGroup.LayoutParams params) Set the layout parameters associated with this view. |
void | setOrientation(@Orientation int orientation) GridLayout uses the orientation property for two purposes:
|
void | setRowCount(int rowCount) RowCount is used only to generate default row/column indices when they are not specified by a component's layout parameters. |
void | setUseDefaultMargins(boolean useDefaultMargins) When true , GridLayout allocates default margins around children based on the child's visual characteristics. |
void | setVisibility(@Visibility int visibility) Set the visibility state of this view. |
Spec | spec(int start, float weight) Equivalent to: spec(start, 1, weight) . |
Spec | spec(int start, Alignment alignment) Return a Spec, spec , where:
To leave the start index undefined, use the value #UNDEFINED . |
Spec | spec(int start, int size) Return a Spec, spec , where:
To leave the start index undefined, use the value #UNDEFINED . |
Spec | spec(int start) Return a Spec, spec , where:
To leave the start index undefined, use the value #UNDEFINED . |