So far, we have created a fragment using the
Fragment subclass to display the details of the point of interest. Let's now use a specialized
ListFragment class to create a new fragment to display the POI list fetched from the server.
Before we start creating the
POIListFragment, let's understand the following key concepts of
ListFragmentis a specialized
Fragmentsubclass used to display the list of items from different data sources, such as an array or a cursor, that hold the query results.
ListFragmentprovides a default layout that contains a single list view. However, it can be customized using your own custom layout.