Rename PlayerView to LegacyPlayerView in media3

The old name is kept in exoplayer2.

PiperOrigin-RevId: 417378759
This commit is contained in:
ibaker 2021-12-20 12:22:32 +00:00 committed by Ian Baker
parent 86ca5b8ec1
commit 46ab94bd41
2 changed files with 8 additions and 7 deletions

View file

@ -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 applications `res/layout`
directory, containing:
creating an `exo_player_control_view.xml` file in the applications
`res/layout` directory, containing:
~~~
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"

View file

@ -443,8 +443,8 @@ public class PlayerView extends FrameLayout implements AdViewProvider {
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);