From 2380f937f3c06145676eaae3224d65f09a987cc4 Mon Sep 17 00:00:00 2001 From: olly Date: Thu, 2 Jan 2020 14:40:47 +0000 Subject: [PATCH] Document overriding of drawables for PlayerControlView Issue: #6779 PiperOrigin-RevId: 287828273 --- .../exoplayer2/ui/PlayerControlView.java | 53 +++++++++++++++---- .../android/exoplayer2/ui/PlayerView.java | 9 +++- 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java index a6636d71be..248ac9fdaf 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java @@ -49,8 +49,8 @@ import java.util.concurrent.CopyOnWriteArrayList; * A view for controlling {@link Player} instances. * *

A PlayerControlView can be customized by setting attributes (or calling corresponding - * methods), overriding the view's layout file or by specifying a custom view layout file, as - * outlined below. + * methods), overriding drawables, overriding the view's layout file, or by specifying a custom view + * layout file. * *

Attributes

* @@ -104,6 +104,30 @@ import java.util.concurrent.CopyOnWriteArrayList; * layout is overridden to specify a custom {@code exo_progress} (see below). * * + *

Overriding drawables

+ * + * The drawables used by PlayerControlView (with its default layout file) can be overridden by + * drawables with the same names defined in your application. The drawables that can be overridden + * are: + * + * + * *

Overriding the layout file

* * To customize the layout of PlayerControlView throughout your app, or just for certain @@ -123,29 +147,38 @@ import java.util.concurrent.CopyOnWriteArrayList; * - *
  • {@code exo_ffwd} - The fast forward button. - * *
  • {@code exo_rew} - The rewind button. * - *
  • {@code exo_prev} - The previous track button. + *
  • {@code exo_ffwd} - The fast forward button. * - *
  • {@code exo_next} - The next track button. + *
  • {@code exo_prev} - The previous button. + * + *
  • {@code exo_next} - The next button. * *
  • {@code exo_repeat_toggle} - The repeat toggle button. * *
  • {@code exo_shuffle} - The shuffle button. * *
  • {@code exo_vr} - The VR mode button. * * + *

    Overriding drawables

    + * + * The drawables used by {@link PlayerControlView} (with its default layout file) can be overridden + * by drawables with the same names defined in your application. See the {@link PlayerControlView} + * documentation for a list of drawables that can be overridden. + * *

    Overriding the layout file

    * * To customize the layout of PlayerView throughout your app, or just for certain configurations,