Exemplo n.º 1
0
 public void onResume() {
   BaseMiniPlayerActivity activity = (BaseMiniPlayerActivity) getContext();
   if (activity
       .getFragmentManager()
       .getBackStackEntryAt(activity.getFragmentManager().getBackStackEntryCount() - 1)
       .getName()
       .toLowerCase()
       .contains(PLYLIST_TAG.toLowerCase())) {
     setOpened();
   }
 }
Exemplo n.º 2
0
 @Override
 public void playAll(PlaylistData item, Context context) {
   if (item.getSongs().isEmpty()) {
     ((MainActivity) context).showMessage(R.string.playlist_is_empty);
     return;
   }
   PlaybackService player = PlaybackService.get(context);
   MusicApp.getSharedPreferences()
       .edit()
       .putLong(Constants.PREF_LAST_PLAYLIST_ID, item.getId())
       .commit();
   player.setArrayPlayback(new ArrayList<AbstractSong>(item.getSongs()));
   ((BaseMiniPlayerActivity) context).startSong((item.getSongs().get(0)));
 }