I am new to android and learning about the adapters. For this i am using the Android official documentation.
I am confused about one thing regarding adapters. Is the Adapter is super interface of all the adapters classes in android?
If yes then why this is not mentioned on this page that it is super interface of all the adapters in android. In fact it is on the top of hierarchy. See picture below:
and even this interface is also not in the hierarchy here: See picture below:
If no then how the methods of Adapter interface are implemented?
Or may be my understandings are wrong. Is this interface available to be implemented by custom user defined class or no it is implemented internally, or something else? Thank you very much in advance for the explanation and clarification of this confusion.
Is the Adapter is super interface of all the adapters classes in android?
No. It is for the classic AdapterView
family of views (e.g., ListView
, Spinner
) and its set of adapters. RecyclerView.Adapter
, PagerAdapter
, etc. are unrelated to Adapter
, other than they all fill the same sort of role.
and even this interface is also not in the hierarchy here: See picture below:
ArrayAdapter
implements ThemedSpinnerAdapter
, which extends Adapter
. The JavaDocs do not point out the inheritance hierarchy of implemented interfaces.