use of com.liskovsoft.smartyoutubetv2.tv.presenter.CustomVerticalGridPresenter in project SmartTubeNext by yuliskov.
the class VideoGridFragment method setupAdapter.
private void setupAdapter() {
VerticalGridPresenter presenter = new CustomVerticalGridPresenter();
presenter.setNumberOfColumns(GridFragmentHelper.getMaxColsNum(getContext(), R.dimen.card_width, mVideoGridScale));
setGridPresenter(presenter);
if (mGridAdapter == null) {
mGridAdapter = new VideoGroupObjectAdapter(mCardPresenter);
setAdapter(mGridAdapter);
}
}
use of com.liskovsoft.smartyoutubetv2.tv.presenter.CustomVerticalGridPresenter in project SmartTubeNext by yuliskov.
the class MultiVideoGridFragment method setupAdapter.
private void setupAdapter() {
// Left vertical list of channels
VerticalGridPresenter presenter1 = new CustomVerticalGridPresenter(R.layout.lb_vertical_grid1, R.id.browse_grid1);
presenter1.setNumberOfColumns(1);
// Right grid of channel's content
VerticalGridPresenter presenter2 = new CustomVerticalGridPresenter(R.layout.lb_vertical_grid2, R.id.browse_grid2);
presenter2.setNumberOfColumns(GridFragmentHelper.getMaxColsNum(getContext(), R.dimen.card_width, mVideoGridScale) - 1);
setGridPresenter1(presenter1);
setGridPresenter2(presenter2);
if (mGridAdapter1 == null) {
mGridAdapter1 = new VideoGroupObjectAdapter(mCardPresenter1);
setAdapter1(mGridAdapter1);
}
if (mGridAdapter2 == null) {
mGridAdapter2 = new VideoGroupObjectAdapter(mCardPresenter2);
setAdapter2(mGridAdapter2);
}
}
Aggregations