Everything you see in this activity is generated inside a class called BrowseFragment. The BrowseFragment creates an interface to allow the user to easily browse content within the app, most typically videos or movies.
The BrowseFragment itself is composed by two sub-fragments: the HeadersFragment and the RowsFragment.
The HeadersFragment shows the header of each row of content, and it can be shown or hidden. Typically it contains the “category” of the content contained in that specific row.
The RowsFragment contains the rows of contents, displayed as video thumbnails. You will see how to populate these content rows using ObjectAdapters.
Populating the BrowseFragment
Content rows are horizontal lists populated through Adapters, which arrange the content using classes dedicated to define the look and feel of the app called Presenters.
In order to populate a single row of content, you will use an ArrayObjectAdapter, which you’ll call listRowAdapter. This adapter is responsible for displaying the content of a single row.
For this example, let’s also assume you defined a class called “movie” that contains all the information for a movie, like title and description.
Finally, you have a HeaderItem that you will use to define the header of the row. You could, for example, define the “comedy” category.
Here is a visual representation of what a listRowAdapter and HeaderItem would look like:
Let’s assume you have a method SetupMovies, which populates a list of movies that you can then pass to the Adapter. The following code is what you will use to populate a single row and define the header item.
BrowseFragment. The easiest way to do this is to have a higher-level Adapter that can manage multiple ListRowAdapters. You can call this class RowsAdapter.
The RowsAdapter contains multiple ListRowAdapters and has its own Presenter to define how the rows of content should be displayed.
You will populate the RowsAdapter by adding multiple listRows, combining listRowAdapters and relative HeaderItems. To do that, you use the class ListRow that receives HeaderItem and ArrayObjectAdapter as parameters.
setAdapter, you populate all the rows in the BrowseFragment and it displays the main interface.

