Add shuffle all to every menu
This commit is contained in:
parent
07b9fbb599
commit
cb11044999
12 changed files with 112 additions and 46 deletions
|
|
@ -23,6 +23,7 @@ import com.kabouzeid.gramophone.App;
|
|||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.adapter.songadapter.AlbumSongAdapter;
|
||||
import com.kabouzeid.gramophone.comparator.SongTrackNumberComparator;
|
||||
import com.kabouzeid.gramophone.helper.MusicPlayerRemote;
|
||||
import com.kabouzeid.gramophone.loader.AlbumLoader;
|
||||
import com.kabouzeid.gramophone.loader.AlbumSongLoader;
|
||||
import com.kabouzeid.gramophone.misc.AppKeys;
|
||||
|
|
@ -244,6 +245,9 @@ public class AlbumDetailActivity extends AbsFabActivity {
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
switch (id) {
|
||||
case R.id.action_shuffle_all:
|
||||
MusicPlayerRemote.shuffleAllSongs(this);
|
||||
return true;
|
||||
case android.R.id.home:
|
||||
super.onBackPressed();
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -304,6 +304,9 @@ public class ArtistDetailActivity extends AbsFabActivity {
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
switch (id) {
|
||||
case R.id.action_shuffle_all:
|
||||
MusicPlayerRemote.shuffleAllSongs(this);
|
||||
return true;
|
||||
case android.R.id.home:
|
||||
super.onBackPressed();
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -236,6 +236,9 @@ public class MainActivity extends AbsFabActivity
|
|||
}
|
||||
int id = item.getItemId();
|
||||
switch (id) {
|
||||
case R.id.action_shuffle_all:
|
||||
MusicPlayerRemote.shuffleAllSongs(this);
|
||||
return true;
|
||||
case R.id.action_new_playlist:
|
||||
CreatePlaylistDialogHelper.getDialog(this).show();
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -387,6 +387,9 @@ public class MusicControllerActivity extends AbsFabActivity {
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
switch (id) {
|
||||
case R.id.action_shuffle_all:
|
||||
MusicPlayerRemote.shuffleAllSongs(this);
|
||||
return true;
|
||||
case R.id.action_settings:
|
||||
Toast.makeText(this, "This feature is not available yet", Toast.LENGTH_SHORT).show();
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue