use of butter.droid.tv.ui.detail.show.presenter.EpisodeCardPresenter in project butter-android by butterproject.
the class TVShowDetailsFragment method populatePresenterSelector.
@Override
protected void populatePresenterSelector(ClassPresenterSelector selector) {
EpisodeCardPresenter presenter = new EpisodeCardPresenter(getActivity());
selector.addClassPresenter(DetailsOverviewRow.class, presenter);
}
use of butter.droid.tv.ui.detail.show.presenter.EpisodeCardPresenter in project butter-android by butterproject.
the class TVShowDetailsFragment method showSeasons.
@Override
public void showSeasons(final Season[] seasons) {
ArrayObjectAdapter objectAdapter = getObjectArrayAdapter();
for (int i = 0; i < seasons.length; i++) {
Season season = seasons[i];
HeaderItem header = new HeaderItem(i, season.getTitle());
EpisodeCardPresenter presenter = new EpisodeCardPresenter(getActivity());
presenter.setOnClickListener(this);
ArrayObjectAdapter episodes = new ArrayObjectAdapter(presenter);
for (final Episode episode : season.getEpisodes()) {
episodes.add(episode);
}
objectAdapter.add(new ListRow(header, episodes));
}
objectAdapter.notifyArrayItemRangeChanged(1, objectAdapter.size());
}
Aggregations