What is the difference between Adapter and Loader in Android?

Technology CommunityCategory: AndroidWhat is the difference between Adapter and Loader in Android?
VietMX Staff asked 3 years ago

An Adapter object acts as a bridge between an AdapterView and the underlying data for that view. The Adapter provides access to the data items.

Loaders make it easy to asynchronously load data in an Activity or Fragment.

Both provide an abstraction for data access, but the Loader performs the query in the background whereas an Adapter executes in the current (presumably UI) thread.