Search in sources :

Example 1 with RecentlyPresenter

use of com.cyl.musiclake.ui.music.local.presenter.RecentlyPresenter in project MusicLake by caiyonglong.

the class RecentlyFragment method initViews.

@Override
public void initViews() {
    mToolbar.setTitle("播放历史");
    setHasOptionsMenu(true);
    if (getActivity() != null) {
        AppCompatActivity appCompatActivity = (AppCompatActivity) getActivity();
        appCompatActivity.setSupportActionBar(mToolbar);
        appCompatActivity.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    }
    mAdapter = new SongAdapter(musicInfos);
    mAdapter.openLoadAnimation(BaseQuickAdapter.SLIDEIN_LEFT);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    mRecyclerView.setAdapter(mAdapter);
    mAdapter.bindToRecyclerView(mRecyclerView);
    mPresenter = new RecentlyPresenter(getContext());
    mPresenter.attachView(this);
}
Also used : AppCompatActivity(android.support.v7.app.AppCompatActivity) SongAdapter(com.cyl.musiclake.ui.music.local.adapter.SongAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) RecentlyPresenter(com.cyl.musiclake.ui.music.local.presenter.RecentlyPresenter)

Aggregations

AppCompatActivity (android.support.v7.app.AppCompatActivity)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 SongAdapter (com.cyl.musiclake.ui.music.local.adapter.SongAdapter)1 RecentlyPresenter (com.cyl.musiclake.ui.music.local.presenter.RecentlyPresenter)1