Search in sources :

Example 1 with BaiduListPresenter

use of com.cyl.musiclake.ui.music.online.presenter.BaiduListPresenter in project MusicLake by caiyonglong.

the class BaiduMusicListActivity method initData.

@Override
protected void initData() {
    mPresenter = new BaiduListPresenter(this);
    mPresenter.attachView(this);
    mAdapter = new SongAdapter(musicList);
    mAdapter.setEnableLoadMore(true);
    LinearLayoutManager layoutManager = new LinearLayoutManager(this);
    layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    mRecyclerView.setLayoutManager(layoutManager);
    mRecyclerView.setAdapter(mAdapter);
    mAdapter.bindToRecyclerView(mRecyclerView);
    showHeaderInfo();
    mPresenter.loadOnlineMusicList(type, 10, mOffset);
}
Also used : SongAdapter(com.cyl.musiclake.ui.music.local.adapter.SongAdapter) BaiduListPresenter(com.cyl.musiclake.ui.music.online.presenter.BaiduListPresenter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 SongAdapter (com.cyl.musiclake.ui.music.local.adapter.SongAdapter)1 BaiduListPresenter (com.cyl.musiclake.ui.music.online.presenter.BaiduListPresenter)1