use of com.cyl.musiclake.ui.music.local.adapter.SongAdapter in project MusicLake by caiyonglong.
the class ArtistSongsFragment method initViews.
@Override
public void initViews() {
artistID = getArguments().getLong(Extras.ARTIST_ID);
transitionName = getArguments().getString(Extras.TRANSITIONNAME);
title = getArguments().getString(Extras.PLAYLIST_NAME);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
album_art.setTransitionName(transitionName);
if (transitionName != null)
album_art.setTransitionName(transitionName);
}
if (title != null)
collapsing_toolbar.setTitle(title);
mPresenter = new ArtistSongsPresenter(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);
}
use of com.cyl.musiclake.ui.music.local.adapter.SongAdapter 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);
}
use of com.cyl.musiclake.ui.music.local.adapter.SongAdapter 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);
}
use of com.cyl.musiclake.ui.music.local.adapter.SongAdapter in project MusicLake by caiyonglong.
the class DownloadedFragment method initViews.
@Override
public void initViews() {
mAdapter = new SongAdapter(musicList);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
mRecyclerView.setAdapter(mAdapter);
mAdapter.bindToRecyclerView(mRecyclerView);
mPresenter = new DownloadPresenter(getActivity());
mPresenter.attachView(this);
}
Aggregations