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);
}
Aggregations