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
|
|
@ -21,6 +21,7 @@ import com.kabouzeid.gramophone.service.MusicService;
|
|||
import com.kabouzeid.gramophone.util.InternalStorageUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
|
|
@ -251,6 +252,14 @@ public class MusicPlayerRemote {
|
|||
}
|
||||
}
|
||||
|
||||
public static void enqueue(List<Song> songs) {
|
||||
if (musicService != null) {
|
||||
musicService.addSongs(songs);
|
||||
final String toast = songs.size() > 1 ? musicService.getResources().getString(R.string.added_x_titles_to_playing_queue, songs.size()) : musicService.getResources().getString(R.string.added_title_to_playing_queue);
|
||||
Toast.makeText(musicService, toast, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
public static void removeFromQueue(Song song) {
|
||||
if (musicService != null) {
|
||||
musicService.removeSong(song);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue