Example usage for Java android.widget AdapterView fields, constructors, methods, implement or subclass
The text is from its open source code.
int | ITEM_VIEW_TYPE_IGNORE The item view type returned by Adapter#getItemViewType(int) when the adapter does not want the item's view recycled. |
int | ITEM_VIEW_TYPE_HEADER_OR_FOOTER The item view type returned by Adapter#getItemViewType(int) when the item is a header or footer. |
int | INVALID_POSITION Represents an invalid position. |
long | INVALID_ROW_ID Represents an empty or invalid row id |
T | getAdapter() Returns the adapter currently associated with this widget. |
int | getBottom() Bottom position of this view relative to its parent. |
View | getChildAt(int index) Returns the view at the specified position in the group. |
int | getChildCount() Returns the number of children in the group. |
Context | getContext() Returns the context the view is running in, through which it can access the current theme, resources, etc. |
int | getCount() |
int | getFirstVisiblePosition() Returns the position within the adapter's data set for the first item displayed on screen. |
int | getId() Returns this view's identifier. |
Object | getItemAtPosition(int position) Gets the data associated with the specified position in the list. |
long | getItemIdAtPosition(int position) |
int | getLastVisiblePosition() Returns the position within the adapter's data set for the last item displayed on screen. |
OnItemClickListener | getOnItemClickListener() |
OnItemLongClickListener | getOnItemLongClickListener() |
int | getPaddingTop() Returns the top padding of this view. |
int | getPositionForView(View view) Returns the position within the adapter's data set for the view, where view is a an adapter item or a descendant of an adapter item. |
Object | getSelectedItem() |
int | getSelectedItemPosition() Return the position of the currently selected item within the adapter's data set |
Object | getTag() Returns this view's tag. |
int | getTop() Top position of this view relative to its parent. |
boolean | isFocused() Returns true if this view has focus |
boolean | performItemClick(View view, int position, long id) Call the OnItemClickListener, if it is defined. |
boolean | post(Runnable action) Causes the Runnable to be added to the message queue. |
boolean | requestFocusFromTouch() Call this to try to give focus to a specific view or to one of its descendants. |
void | setAdapter(T adapter) Sets the adapter that provides the data and the views to represent the data in this widget. |
void | setEmptyView(View emptyView) Sets the view to show if the adapter is empty |
void | setId(@IdRes int id) Sets the identifier for this view. |
void | setOnClickListener(OnClickListener l) |
void | setOnItemClickListener(@Nullable OnItemClickListener listener) Register a callback to be invoked when an item in this AdapterView has been clicked. |
void | setOnItemLongClickListener(OnItemLongClickListener listener) Register a callback to be invoked when an item in this AdapterView has been clicked and held |
void | setOnItemSelectedListener(@Nullable OnItemSelectedListener listener) Register a callback to be invoked when an item in this AdapterView has been selected. |
void | setSelected(boolean selected) Changes the selection state of this view. |
void | setSelection(int position) Sets the currently selected item. |
void | setTag(final Object tag) Sets the tag associated with this view. |
void | setTag(int key, final Object tag) Sets a tag associated with this view and a key. |
void | setVisibility(@Visibility int visibility) Set the visibility state of this view. |
boolean | showContextMenu() Shows the context menu for this view. |