A very complete recipe that implements a RecyclerView that pulls in paginated data, using Retrofit, LiveData. It includes example models, adapter, viewholders, and a viewholder for displaying the network state in case of an error.
Read more…All snippets tagged with api
Page 1 of 1Pagination
Using local JSON files as an API placeholder with Retrofit
With this snippet you can easily and quickly mock an API during developmentby placing JSON files in your res/raw/
folder. This comes in handy when the actual
API does not exist yet.
Pagination
A very complete recipe that implements a RecyclerView that pulls in paginated data, using Retrofit, LiveData. It includes example models, adapter, viewholders, and a viewholder for displaying the network state in case of an error.
Read more…