Prepared everything for multi-selection and implemented it in the song view for now.
This commit is contained in:
parent
9835c595b2
commit
8503eb4e36
55 changed files with 348 additions and 108 deletions
|
|
@ -42,6 +42,7 @@ import com.nostra13.universalimageloader.core.listener.SimpleImageLoadingListene
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MusicService extends Service implements MediaPlayer.OnPreparedListener, MediaPlayer.OnErrorListener, MediaPlayer.OnCompletionListener, AudioManager.OnAudioFocusChangeListener {
|
||||
public static final String ACTION_TOGGLE_PLAYBACK = "com.kabouzeid.gramophone.action.TOGGLE_PLAYBACK";
|
||||
|
|
@ -552,6 +553,18 @@ public class MusicService extends Service implements MediaPlayer.OnPreparedListe
|
|||
saveState();
|
||||
}
|
||||
|
||||
public void addSongs(int position, List<Song> songs) {
|
||||
playingQueue.addAll(position, songs);
|
||||
originalPlayingQueue.addAll(position, songs);
|
||||
saveState();
|
||||
}
|
||||
|
||||
public void addSongs(List<Song> songs) {
|
||||
playingQueue.addAll(songs);
|
||||
originalPlayingQueue.addAll(songs);
|
||||
saveState();
|
||||
}
|
||||
|
||||
public void removeSong(int position) {
|
||||
if (getShuffleMode() == SHUFFLE_MODE_NONE) {
|
||||
playingQueue.remove(position);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue