private void playNext() { musicSrv.playNext(); if (playbackPaused) { setController(); playbackPaused = false; } controller.show(0); }
/** Play previous song */ private void playPrev() { musicService.playPrev(); if (playbackPaused) { setController(); playbackPaused = false; } controller.show(0); }
private void playNext() { musicService.playNext(); if (playbackPaused) { setMusicController(); playbackPaused = false; } musicController.show(0); }
/** * OnClick for the listView * * @param view */ public void songPicked(View view) { musicService.setSong(Integer.parseInt(view.getTag().toString())); musicService.playSong(); if (playbackPaused) { setController(); playbackPaused = false; } controller.show(0); }
public void riffPicked(View view) { musicSrv.get().setRiff(Integer.parseInt(view.getTag().toString())); musicSrv.get().playRiff(); if (playbackPaused) { setController(); playbackPaused = false; } controller.show(0); }
private void setController() { mController = new MusicController(getActivity()); mController.setPrevNextListeners( new View.OnClickListener() { @Override public void onClick(View v) { playNext(); } }, new View.OnClickListener() { @Override public void onClick(View v) { playPrev(); } }); mController.setMediaPlayer(this); mController.setAnchorView(fragmentView.findViewById(R.id.song_list)); mController.setEnabled(true); }
private void setController() { // set the controller up controller = new MusicController(this); controller.setPrevNextListeners( new View.OnClickListener() { @Override public void onClick(View v) { playNext(); } }, new View.OnClickListener() { @Override public void onClick(View v) { playPrev(); } }); controller.setMediaPlayer(this); controller.setAnchorView(findViewById(R.id.riff_list)); controller.setEnabled(true); }
// set the controller up private void setController() { controller = new MusicController(this); // set previous and next button listeners controller.setPrevNextListeners( new View.OnClickListener() { @Override public void onClick(View v) { playNext(); } }, new View.OnClickListener() { @Override public void onClick(View v) { playPrev(); } }); // set and show controller.setMediaPlayer(this); controller.setAnchorView(findViewById(R.id.song_list)); controller.setEnabled(true); }
@Override protected void onStop() { controller.hide(); super.onStop(); }
@Override public void onStop() { mController.hide(); super.onStop(); }