Commit 46ab94bd by ibaker Committed by Ian Baker

Rename PlayerView to LegacyPlayerView in media3

The old name is kept in exoplayer2.

PiperOrigin-RevId: 417378759
parent 86ca5b8e
...@@ -190,14 +190,15 @@ Note that overriding these drawables will also affect the appearance of ...@@ -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 All of the view components inflate their layouts from corresponding layout
files, which are specified in their Javadoc. For example when a files, which are specified in their Javadoc. For example when a
`PlayerControlView` is instantiated, it inflates its layout from `PlayerControlView` is instantiated, it inflates its layout from
`exo_player_control_view.xml`. To customize these layouts, an application can `exo_player_control_view.xml`. To customize these layouts, an application
define layout files with the same names in its own `res/layout*` directories. can define layout files with the same names in its own `res/layout*`
These layout files will override the ones provided by the ExoPlayer library. 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 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 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` creating an `exo_player_control_view.xml` file in the application’s
directory, containing: `res/layout` directory, containing:
~~~ ~~~
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
......
...@@ -443,8 +443,8 @@ public class PlayerView extends FrameLayout implements AdViewProvider { ...@@ -443,8 +443,8 @@ public class PlayerView extends FrameLayout implements AdViewProvider {
break; break;
} }
surfaceView.setLayoutParams(params); surfaceView.setLayoutParams(params);
// We don't want surfaceView to be clickable separately to the PlayerView itself, but we do // We don't want surfaceView to be clickable separately to the PlayerView itself, but we
// want to register as an OnClickListener so that surfaceView implementations can propagate // 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. // click events up to the PlayerView by calling their own performClick method.
surfaceView.setOnClickListener(componentListener); surfaceView.setOnClickListener(componentListener);
surfaceView.setClickable(false); surfaceView.setClickable(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment