Search in sources :

Example 1 with FolderSongPresenter

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

the class FolderSongsFragment method initViews.

@Override
public void initViews() {
    mToolbar.setTitle("文件夹");
    setHasOptionsMenu(true);
    if (getActivity() != null) {
        AppCompatActivity appCompatActivity = (AppCompatActivity) getActivity();
        appCompatActivity.setSupportActionBar(mToolbar);
        appCompatActivity.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    }
    mPresenter = new FolderSongPresenter(getActivity());
    mPresenter.attachView(this);
    if (getArguments() != null) {
        path = getArguments().getString(Extras.FOLDER_PATH);
    }
    mAdapter = new SongAdapter(null);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRecyclerView.setAdapter(mAdapter);
    mAdapter.bindToRecyclerView(mRecyclerView);
    setHasOptionsMenu(true);
}
Also used : FolderSongPresenter(com.cyl.musiclake.ui.music.local.presenter.FolderSongPresenter) AppCompatActivity(android.support.v7.app.AppCompatActivity) SongAdapter(com.cyl.musiclake.ui.music.local.adapter.SongAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

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 FolderSongPresenter (com.cyl.musiclake.ui.music.local.presenter.FolderSongPresenter)1