What’s the difference between BaseAdapter and ArrayAdapter?

Here is the difference:

  • BaseAdapter is a very generic adapter that allows you to do pretty much whatever you want. However, you have to do a bit more coding yourself to get it working.
  • ArrayAdapter is a more complete implementation that works well for data in arrays or ArrayLists. Similarly, there is a related CursorAdapter that you should use if your data is in a Cursor. Both of these extend BaseAdapter.

If your data is in a specialized collection of some sort or if you don’t want the default behavior that ArrayAdapter provides, you will likely want to extend BaseAdapter to get the flexibility you need.

The performance of each really depends on how you implement them or change their behavior. At their core, either one can be just as effective (especially considering that an ArrayAdapter is a BaseAdapter).

You can do pretty much whatever you want with any adapter, but keep in mind that BaseAdapter is abstract, so you can’t use it directly.

Leave a Comment