use of android.support.v17.leanback.widget.VerticalGridPresenter in project android-UniversalMusicPlayer by googlesamples.
the class TvVerticalGridFragment method setupFragment.
private void setupFragment() {
VerticalGridPresenter gridPresenter = new VerticalGridPresenter();
gridPresenter.setNumberOfColumns(NUM_COLUMNS);
setGridPresenter(gridPresenter);
mAdapter = new ArrayObjectAdapter(new CardPresenter(getActivity()));
setAdapter(mAdapter);
setOnItemViewClickedListener(new ItemViewClickedListener());
}
use of android.support.v17.leanback.widget.VerticalGridPresenter in project vlc-android by videolan.
the class GridFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mContext = getActivity();
VerticalGridPresenter gridPresenter = new VerticalGridPresenter();
gridPresenter.setNumberOfColumns(NUM_COLUMNS);
setGridPresenter(gridPresenter);
mAdapter = new ArrayObjectAdapter(new CardPresenter(mContext));
mAdapter.clear();
setAdapter(mAdapter);
}
use of android.support.v17.leanback.widget.VerticalGridPresenter in project vlc-android by GeoffreyMetais.
the class GridFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mContext = getActivity();
VerticalGridPresenter gridPresenter = new VerticalGridPresenter();
gridPresenter.setNumberOfColumns(NUM_COLUMNS);
setGridPresenter(gridPresenter);
mAdapter = new ArrayObjectAdapter(new CardPresenter(mContext));
mAdapter.clear();
setAdapter(mAdapter);
}
use of android.support.v17.leanback.widget.VerticalGridPresenter in project butter-android by butterproject.
the class TVMediaGridFragment method setupUi.
private void setupUi() {
VerticalGridPresenter gridPresenter = new VerticalGridPresenter();
gridPresenter.setNumberOfColumns(NUM_COLUMNS);
setGridPresenter(gridPresenter);
ClassPresenterSelector presenterSelector = new ClassPresenterSelector();
presenterSelector.addClassPresenter(MediaCardItem.class, new MediaCardPresenter(getActivity(), picasso));
presenterSelector.addClassPresenter(LoadingCardItem.class, new LoadingCardPresenter(getActivity()));
adapter = new GridPagingAdapter(presenterSelector);
setAdapter(adapter);
pagingManager = new GridPagingManager<>();
pagingManager.init(NUM_COLUMNS, adapter, this);
setOnItemViewClickedListener(this);
setOnItemViewSelectedListener(this);
}
Aggregations