

In the above code snippet is the implementation of a ArrayAdapter. Here is code of ArrayAdapter in Android: ArrayAdapter(Context context, int resource, int textViewResourceId, T objects) By doing this we can override all the function’s of BaseAdapter in our custom adapter. Important Note: ArrayAdapter is an implementation of BaseAdapter so if we need to create a custom list view or a grid view then we have to create our own custom adapter and extend ArrayAdapter in that custom class.

Whenever you have a list of single type of items which is backed by an array, you can use ArrayAdapter.

ArrayAdapter is more simple and commonly used Adapter in android. It holds the data and send the data to adapter view then view can takes the data from the adapter view and shows the data on different views like listview, gridview, spinner etc. In android, An adapter is a bridge between UI component and data source that helps us to fill data in UI component.
