Search in sources :

Example 1 with ClassPresenterSelector

use of android.support.v17.leanback.widget.ClassPresenterSelector in project android-UniversalMusicPlayer by googlesamples.

the class TvPlaybackFragment method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    LogHelper.i(TAG, "onCreate");
    mBackgroundManager = BackgroundManager.getInstance(getActivity());
    mBackgroundManager.attach(getActivity().getWindow());
    mHandler = new Handler();
    mListRowAdapter = new ArrayObjectAdapter(new CardPresenter());
    mPresenterSelector = new ClassPresenterSelector();
    mRowsAdapter = new ArrayObjectAdapter(mPresenterSelector);
    setBackgroundType(BACKGROUND_TYPE);
    setFadingEnabled(false);
}
Also used : Handler(android.os.Handler) ArrayObjectAdapter(android.support.v17.leanback.widget.ArrayObjectAdapter) ClassPresenterSelector(android.support.v17.leanback.widget.ClassPresenterSelector)

Aggregations

Handler (android.os.Handler)1 ArrayObjectAdapter (android.support.v17.leanback.widget.ArrayObjectAdapter)1 ClassPresenterSelector (android.support.v17.leanback.widget.ClassPresenterSelector)1