Search in sources :

Example 1 with CardPresenter

use of org.videolan.vlc.gui.tv.CardPresenter 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);
}
Also used : VerticalGridPresenter(android.support.v17.leanback.widget.VerticalGridPresenter) CardPresenter(org.videolan.vlc.gui.tv.CardPresenter) ArrayObjectAdapter(android.support.v17.leanback.widget.ArrayObjectAdapter)

Example 2 with CardPresenter

use of org.videolan.vlc.gui.tv.CardPresenter in project vlc-android by videolan.

the class SortedBrowserFragment method updateList.

@Override
public void updateList() {
    Activity activity = getActivity();
    if (activity == null)
        return;
    mAdapter = new ArrayObjectAdapter(new ListRowPresenter());
    setAdapter(mAdapter);
    ArrayObjectAdapter adapter;
    HeaderItem header;
    synchronized (mMediaItemMap) {
        if (mTempMap != null)
            mMediaItemMap = mTempMap;
    }
    for (ListItem item : mMediaItemMap.values()) {
        adapter = new ArrayObjectAdapter(new CardPresenter(activity));
        header = new HeaderItem(0, item.Letter);
        adapter.addAll(0, item.mediaList);
        mAdapter.add(new ListRow(header, adapter));
    }
    mHandler.sendEmptyMessageDelayed(HIDE_LOADING, 3000);
}
Also used : ListRowPresenter(android.support.v17.leanback.widget.ListRowPresenter) CardPresenter(org.videolan.vlc.gui.tv.CardPresenter) MainTvActivity(org.videolan.vlc.gui.tv.MainTvActivity) DetailsActivity(org.videolan.vlc.gui.tv.DetailsActivity) Activity(android.app.Activity) ArrayObjectAdapter(android.support.v17.leanback.widget.ArrayObjectAdapter) HeaderItem(android.support.v17.leanback.widget.HeaderItem) ListRow(android.support.v17.leanback.widget.ListRow)

Example 3 with CardPresenter

use of org.videolan.vlc.gui.tv.CardPresenter 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);
}
Also used : VerticalGridPresenter(android.support.v17.leanback.widget.VerticalGridPresenter) CardPresenter(org.videolan.vlc.gui.tv.CardPresenter) ArrayObjectAdapter(android.support.v17.leanback.widget.ArrayObjectAdapter)

Aggregations

ArrayObjectAdapter (android.support.v17.leanback.widget.ArrayObjectAdapter)3 CardPresenter (org.videolan.vlc.gui.tv.CardPresenter)3 VerticalGridPresenter (android.support.v17.leanback.widget.VerticalGridPresenter)2 Activity (android.app.Activity)1 HeaderItem (android.support.v17.leanback.widget.HeaderItem)1 ListRow (android.support.v17.leanback.widget.ListRow)1 ListRowPresenter (android.support.v17.leanback.widget.ListRowPresenter)1 DetailsActivity (org.videolan.vlc.gui.tv.DetailsActivity)1 MainTvActivity (org.videolan.vlc.gui.tv.MainTvActivity)1