This is a small example of how to fetch Data by calling a REST API using Volley library using MVP architecture.
Following are the modules used:
-
#Views MainActivity - Uses a recyclerView to show data which it fetches from the Presenter Layer DetailActivity - Shows the detailed information of each product 1.1 #Adapter ProductAdapter - act as the adapter for recyclerView
-
#Presenter MainPresenter - Acts as the presenter layer for MainActivity DetailPresenter - Acts as the presenter layer for DetailActivity
-
#Models The POJOs which are used for deserializing of data using gson
-
#Helper VolleyRequestHelper - used by presenter Layer to communicate with server and fetch data