Skip to content

Commit

Permalink
Rename PlayerView to LegacyPlayerView in media3
Browse files Browse the repository at this point in the history
The old name is kept in exoplayer2.

PiperOrigin-RevId: 417378759
  • Loading branch information
icbaker committed Dec 20, 2021
1 parent 86ca5b8 commit 46ab94b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions docs/ui-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,15 @@ Note that overriding these drawables will also affect the appearance of
All of the view components inflate their layouts from corresponding layout
files, which are specified in their Javadoc. For example when a
`PlayerControlView` is instantiated, it inflates its layout from
`exo_player_control_view.xml`. To customize these layouts, an application can
define layout files with the same names in its own `res/layout*` directories.
These layout files will override the ones provided by the ExoPlayer library.
`exo_player_control_view.xml`. To customize these layouts, an application
can define layout files with the same names in its own `res/layout*`
directories. These layout files will override the ones provided by the ExoPlayer
library.

As an example, suppose we want our playback controls to consist of only a
play/pause button positioned in the center of the view. We can achieve this by
creating an `exo_player_control_view.xml` file in the application’s `res/layout`
directory, containing:
creating an `exo_player_control_view.xml` file in the application’s
`res/layout` directory, containing:

~~~
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ public PlayerView(Context context, @Nullable AttributeSet attrs, int defStyleAtt
break;
}
surfaceView.setLayoutParams(params);
// We don't want surfaceView to be clickable separately to the PlayerView itself, but we do
// want to register as an OnClickListener so that surfaceView implementations can propagate
// We don't want surfaceView to be clickable separately to the PlayerView itself, but we
// do want to register as an OnClickListener so that surfaceView implementations can propagate
// click events up to the PlayerView by calling their own performClick method.
surfaceView.setOnClickListener(componentListener);
surfaceView.setClickable(false);
Expand Down

0 comments on commit 46ab94b

Please sign in to comment.