Structural patterns
These patterns are structured to understand exactly what they are doing, and can be made use of in multiple places because of their organized patterns. They create objects in a familiar arrangement that perform typical tasks. In Android, the structural patterns are Adapter and Facade.
Adapter
The word adapter says it all: it adapts itself to be a bridge between the data source and the type of view this data has to be displayed in; basically, the adapter view.
The data here might be of any kind, but it needs to be displayed in the same view, for which an adapter plays an important role.
The following figure identifies how the adapter binds the data with the view:

The data could be in any form, such as List
, ArrayList
, Array
, Cursor
, and so on. This kind of data needs to be displayed in the RecyclerView
, Spinner
, and so on, to display the data in a list.
The adapter does not know what kind of data it is going to handle. It will handle and display the type of data it is asked...