use of com.cyl.musiclake.ui.music.local.presenter.AlbumDetailPresenter in project MusicLake by caiyonglong.
the class AlbumDetailFragment method initViews.
@Override
public void initViews() {
albumID = getArguments().getLong(Extras.ALBUM_ID);
transitionName = getArguments().getString(Extras.TRANSITIONNAME);
title = getArguments().getString(Extras.PLAYLIST_NAME);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (transitionName != null) {
album_art.setTransitionName(transitionName);
album_art.setHasTransientState(true);
}
}
if (title != null)
collapsing_toolbar.setTitle(title);
mPresenter = new AlbumDetailPresenter(getContext());
mPresenter.attachView(this);
setHasOptionsMenu(true);
if (getActivity() != null) {
AppCompatActivity appCompatActivity = (AppCompatActivity) getActivity();
appCompatActivity.setSupportActionBar(mToolbar);
appCompatActivity.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
mAdapter = new SongAdapter(musicInfos);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
mRecyclerView.setAdapter(mAdapter);
mAdapter.bindToRecyclerView(mRecyclerView);
}
Aggregations