Search in sources :

Example 1 with AlbumSongsAdapter

use of io.hefuyi.listener.ui.adapter.AlbumSongsAdapter in project ListenerMusicPlayer by hefuyicoder.

the class AlbumDetailFragment method onFabPlayClick.

@OnClick(R.id.fab_play)
public void onFabPlayClick() {
    Handler handler = new Handler();
    handler.postDelayed(new Runnable() {

        @Override
        public void run() {
            AlbumSongsAdapter adapter = (AlbumSongsAdapter) recyclerView.getAdapter();
            MusicPlayer.playAll(getActivity(), adapter.getSongIds(), 0, albumID, ListenerUtil.IdType.Album, false);
        }
    }, 150);
}
Also used : AlbumSongsAdapter(io.hefuyi.listener.ui.adapter.AlbumSongsAdapter) Handler(android.os.Handler) OnClick(butterknife.OnClick)

Example 2 with AlbumSongsAdapter

use of io.hefuyi.listener.ui.adapter.AlbumSongsAdapter in project ListenerMusicPlayer by hefuyicoder.

the class AlbumDetailFragment method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    injectDependences();
    mPresenter.attachView(this);
    if (getArguments() != null) {
        albumID = getArguments().getLong(Constants.ALBUM_ID);
        albumName = getArguments().getString(Constants.ALBUM_NAME);
    }
    context = getActivity();
    mPreferences = PreferencesUtility.getInstance(context);
    mAdapter = new AlbumSongsAdapter(getActivity(), albumID);
}
Also used : AlbumSongsAdapter(io.hefuyi.listener.ui.adapter.AlbumSongsAdapter)

Aggregations

AlbumSongsAdapter (io.hefuyi.listener.ui.adapter.AlbumSongsAdapter)2 Handler (android.os.Handler)1 OnClick (butterknife.OnClick)1