// Player function public void onPausePlaySong(View view) { if (MusicService.isPlaying == true) { musicSrv.pauseSong(); MusicService.isPlaying = false; ImageButton b = (ImageButton) findViewById(R.id.pause_play_song); b.setImageResource(R.drawable.ic_action_play); } else if (MusicService.CurrentSong.size() > 0) { musicSrv.playSongAgain(); MusicService.isPlaying = true; ImageButton b = (ImageButton) findViewById(R.id.pause_play_song); b.setImageResource(R.drawable.ic_action_pause); } }