Esempio n. 1
0
 @Override
 public void onMusicPlaying(int progress, long max) {
   if (mSongAdapter != null && mSongAdapter.getPlayingId() == 0) {
     SongInfo song = SongManager.with(getActivity()).getCurrentSong();
     if (song != null) {
       mSongAdapter.setPlaying(song.getId());
     }
   }
 }
Esempio n. 2
0
  @Override
  public void onMusicPlay(int songId) {
    if (mSongAdapter == null) return;
    mSongAdapter.setPlaying(songId);

    if (getActivity() != null) {
      ((MainActivity) getActivity()).onMusicPlay(songId);
    }
  }
Esempio n. 3
0
 @Override
 public void onServiceDisconnected(ComponentName name) {
   if (mSongAdapter == null) return;
   mSongAdapter.setPlaying(-1);
 }
Esempio n. 4
0
 @Override
 public void onMusicStop() {
   if (mSongAdapter == null) return;
   mSongAdapter.setPlaying(-1);
 }