use of com.github.pedrovgs.sample.renderer.EpisodeRendererAdapter in project DraggablePanel by pedrovgs.
the class TvShowsActivity method renderEpisodes.
/**
* Render a list of episodes using a tv show view model with the information. This method create
* an adapter with the episodes information to be inserted in the ListView.
*
* @param tvShow to render
*/
private void renderEpisodes(final TvShowViewModel tvShow) {
List<Renderer<EpisodeViewModel>> episodeRenderers = new LinkedList<Renderer<EpisodeViewModel>>();
episodeRenderers.add(new EpisodeRenderer());
EpisodeRendererBuilder episodeRendererBuilder = new EpisodeRendererBuilder(episodeRenderers);
EpisodeRendererAdapter episodesAdapter = new EpisodeRendererAdapter(getLayoutInflater(), episodeRendererBuilder, tvShow.getEpisodes());
episodesListView.setAdapter(episodesAdapter);
}
Aggregations