Add "Show queue" to Action list

User can now select "Show queue" as an action when interacting (press,
long press, swipe up, swipe down) with the Cover in the Playback Screen.
This commit is contained in:
Pierre Equoy 2013-03-10 02:56:53 +08:00
parent 0e60e51128
commit df83255126
3 changed files with 11 additions and 0 deletions

View File

@ -52,6 +52,7 @@ THE SOFTWARE.
<item>EnqueueArtist</item> <item>EnqueueArtist</item>
<item>EnqueueGenre</item> <item>EnqueueGenre</item>
<item>ClearQueue</item> <item>ClearQueue</item>
<item>ShowQueue</item>
<item>ToggleControls</item> <item>ToggleControls</item>
</string-array> </string-array>
<string-array name="swipe_action_entries"> <string-array name="swipe_action_entries">
@ -69,6 +70,7 @@ THE SOFTWARE.
<item>@string/enqueue_current_artist</item> <item>@string/enqueue_current_artist</item>
<item>@string/enqueue_current_genre</item> <item>@string/enqueue_current_genre</item>
<item>@string/clear_queue</item> <item>@string/clear_queue</item>
<item>@string/show_queue</item>
<item>@string/toggle_controls</item> <item>@string/toggle_controls</item>
</string-array> </string-array>
<string-array name="default_playlist_action_entries"> <string-array name="default_playlist_action_entries">

View File

@ -80,6 +80,10 @@ enum Action {
* Clear the queue of all remaining songs. * Clear the queue of all remaining songs.
*/ */
ClearQueue, ClearQueue,
/**
* Show the queue.
*/
ShowQueue,
/** /**
* Toggle the controls in the playback activity. * Toggle the controls in the playback activity.
*/ */

View File

@ -1912,6 +1912,11 @@ public final class PlaybackService extends Service
clearQueue(); clearQueue();
Toast.makeText(this, R.string.queue_cleared, Toast.LENGTH_SHORT).show(); Toast.makeText(this, R.string.queue_cleared, Toast.LENGTH_SHORT).show();
break; break;
case ShowQueue:
Intent intentShowQueue = new Intent(this, ShowQueueActivity.class);
intentShowQueue.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intentShowQueue);
break;
case ToggleControls: case ToggleControls:
// Handled in FullPlaybackActivity.performAction // Handled in FullPlaybackActivity.performAction
break; break;