Are android adapters an example of Adapter Design pattern?

No, they aren't. The GoF Adapter is used when you need to convert an interface between two types that are similar but not the same. The most common case is when interfacing between two libraries that were not written with each other in mind. For example you may use a library that returns a Map, but you want to pass that result into a networking library that expects a JSONObject. You could use an Adapter pattern to convert it (this is a little bit of a trivial example, but you get the idea).

An Android Adapter like for a ListView or RecyclerView doesn't do that. Instead it takes the data from a model and puts it into a View. Really its closest equivalent is an MVP Presenter.

There are plenty of classes in the world named similarly to GoF that have nothing to do with those patterns (for example, the word State is very rarely part of a State Machine). Adapter in particular was used for a dozen purposes long before GoF was written.


Android adapters are in fact the same Adapter design pattern as per the GoF. Adapters are used to give a known interface to unknown objects. eg: if we are using any 3rd party libraries, it is recommended to have adapters implemented so that the 3rd party interface is converted to a known interface. Then it becomes easy to replace the 3rp party libraries with just adding a new adapter.

Now, look at the ListView Adapter concept in Android as a whole. 3rd party developers are free to add any data backend and make the list view work if they implement the known interface which is the Android defined adapter kind. I hope that clarifies the design pattern.