From 1b9c904dbae7009fcb448b0db3b2286289f14925 Mon Sep 17 00:00:00 2001 From: tonihei Date: Fri, 25 Aug 2017 02:52:35 -0700 Subject: [PATCH] Add UI for shuffle mode. This includes an option to show and hide the shuffle mode button. When pressing the button, the shuffle mode of the player is toggled. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=166455759 --- .../exoplayer2/ui/PlaybackControlView.java | 73 ++++++++++++++++++- .../exoplayer2/ui/SimpleExoPlayerView.java | 10 +++ .../res/layout/exo_playback_control_view.xml | 3 + library/ui/src/main/res/values/attrs.xml | 2 + 4 files changed, 87 insertions(+), 1 deletion(-) diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlaybackControlView.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlaybackControlView.java index 91308848f9..f83bab5770 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlaybackControlView.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlaybackControlView.java @@ -84,6 +84,12 @@ import java.util.Locale; *
  • Default: {@link PlaybackControlView#DEFAULT_REPEAT_TOGGLE_MODES}
  • * * + *
  • {@code show_shuffle_button} - Whether the shuffle button is shown. + * + *
  • *
  • {@code controller_layout_id} - Specifies the id of the layout to be inflated. See * below for more details. * *
  • + *
  • {@code exo_shuffle} - The shuffle button. + * + *
  • *
  • {@code exo_position} - Text view displaying the current playback position. *