Search in sources :

Example 1 with MorePresenter

use of butter.droid.tv.presenters.MorePresenter in project butter-android by butterproject.

the class TVOverviewFragment method setupMoreRow.

@Override
public void setupMoreRow() {
    HeaderItem gridHeader = new HeaderItem(getString(R.string.more));
    MorePresenter gridPresenter = new MorePresenter(requireContext());
    ArrayObjectAdapter gridRowAdapter = new ArrayObjectAdapter(gridPresenter);
    gridRowAdapter.add(new MorePresenter.MoreItem(R.id.more_item_settings, R.string.preferences, R.drawable.ic_settings));
    rowsAdapter.add(new ListRow(gridHeader, gridRowAdapter));
}
Also used : HeaderItem(android.support.v17.leanback.widget.HeaderItem) ArrayObjectAdapter(android.support.v17.leanback.widget.ArrayObjectAdapter) MorePresenter(butter.droid.tv.presenters.MorePresenter) ListRow(android.support.v17.leanback.widget.ListRow)

Example 2 with MorePresenter

use of butter.droid.tv.presenters.MorePresenter in project butter-android by butterproject.

the class TVOverviewFragment method addMoreOptionsAdapter.

private ArrayObjectAdapter addMoreOptionsAdapter() {
    HeaderItem moreOptionsHeader = new HeaderItem(getString(R.string.more_movies));
    MorePresenter morePresenter = new MorePresenter(requireContext());
    ArrayObjectAdapter moreOptionsAdapter = new ArrayObjectAdapter(morePresenter);
    rowsAdapter.add(new ListRow(moreOptionsHeader, moreOptionsAdapter));
    return moreOptionsAdapter;
}
Also used : HeaderItem(android.support.v17.leanback.widget.HeaderItem) ArrayObjectAdapter(android.support.v17.leanback.widget.ArrayObjectAdapter) MorePresenter(butter.droid.tv.presenters.MorePresenter) ListRow(android.support.v17.leanback.widget.ListRow)

Aggregations

ArrayObjectAdapter (android.support.v17.leanback.widget.ArrayObjectAdapter)2 HeaderItem (android.support.v17.leanback.widget.HeaderItem)2 ListRow (android.support.v17.leanback.widget.ListRow)2 MorePresenter (butter.droid.tv.presenters.MorePresenter)2