Example usage for Java android.widget GridView fields, constructors, methods, implement or subclass
The text is from its open source code.
int | NO_STRETCH Disables stretching. |
int | STRETCH_SPACING Stretches the spacing between columns. |
int | STRETCH_COLUMN_WIDTH Stretches columns. |
int | STRETCH_SPACING_UNIFORM Stretches the spacing between columns. |
int | AUTO_FIT Creates as many columns as can fit on screen. |
ListAdapter | getAdapter() |
int | getHorizontalSpacing() Returns the amount of horizontal spacing currently used between each item in the grid. |
int | getNumColumns() Get the number of columns in the grid. |
int | getRequestedColumnWidth() Return the requested width of a column in the grid. |
int | getVerticalSpacing() Returns the amount of vertical spacing between each item in the grid. |
void | invalidateViews() Causes all the views to be rebuilt and redrawn. |
void | requestLayout() |
void | setAdapter(ListAdapter adapter) Sets the data behind this GridView. |
void | setCacheColorHint(@ColorInt int color) When set to a non-zero value, the cache color hint indicates that this list is always drawn on top of a solid, single-color, opaque background. |
void | setChoiceMode(int choiceMode) Defines the choice behavior for the List. |
void | setColumnWidth(int columnWidth) Set the width of columns in the grid. |
void | setDrawSelectorOnTop(boolean onTop) Controls whether the selection highlight drawable should be drawn on top of the item or behind it. |
void | setFastScrollAlwaysVisible(final boolean alwaysShow) Set whether or not the fast scroller should always be shown in place of the standard scroll bars. |
void | setFastScrollEnabled(final boolean enabled) Specifies whether fast scrolling is enabled or disabled. |
void | setGravity(int gravity) Set the gravity for this grid. |
void | setHorizontalSpacing(int horizontalSpacing) Set the amount of horizontal (x) spacing to place between each item in the grid. |
void | setItemChecked(int position, boolean value) Sets the checked state of the specified position. |
void | setNumColumns(int numColumns) Set the number of columns in the grid |
void | setOnScrollListener(OnScrollListener l) Set the listener that will receive notifications every time the list scrolls. |
void | setOverScrollMode(int mode) |
void | setSelection(int position) Sets the currently selected item |
void | setSelectionFromTop(int position, int y) Sets the selected item and positions the selection y pixels from the top edge of the ListView. |
void | setSelector(@DrawableRes int resID) Set a Drawable that should be used to highlight the currently selected item. |
void | setSmoothScrollbarEnabled(boolean enabled) When smooth scrollbar is enabled, the position and size of the scrollbar thumb is computed based on the number of visible pixels in the visible items. |
void | setStretchMode(@StretchMode int stretchMode) Control how items are stretched to fill their space. |
void | setVelocityScale(float scale) Sets a scale factor for the fling velocity. |
void | setVerticalSpacing(int verticalSpacing) Set the amount of vertical (y) spacing to place between each item in the grid. |
void | smoothScrollBy(int distance, int duration) Smoothly scroll by distance pixels over duration milliseconds. |
void | smoothScrollToPosition(int position) Smoothly scroll to the specified adapter position. |