Example usage for Java android.widget ArrayAdapter fields, constructors, methods, implement or subclass
The text is from its open source code.
void | add(@Nullable T object) Adds the specified object at the end of the array. |
void | addAll(@NonNull Collection extends T> collection) Adds the specified Collection at the end of the array. |
void | addAll(T... items) Adds the specified items at the end of the array. |
void | clear() Remove all elements from the list. |
ArrayAdapter | createFromResource(@NonNull Context context, @ArrayRes int textArrayResId, @LayoutRes int textViewResId) Creates a new ArrayAdapter from external resources. |
int | getCount() |
Filter | getFilter() |
T | getItem(int position) |
int | getPosition(@Nullable T item) Returns the position of the specified item in the array. |
View | getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) |
void | insert(@Nullable T object, int index) Inserts the specified object at the specified index in the array. |
void | notifyDataSetChanged() |
void | remove(@Nullable T object) Removes the specified object from the array. |
void | setDropDownViewResource(@LayoutRes int resource) Sets the layout resource to create the drop down views. |
void | setNotifyOnChange(boolean notifyOnChange) Control whether methods that change the list ( #add , #addAll(Collection) , #addAll(Object[]) , #insert , #remove , #clear , #sort(Comparator) ) automatically call #notifyDataSetChanged . |
void | sort(@NonNull Comparator super T> comparator) Sorts the content of this adapter using the specified comparator. |