mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Make surfaceView non-clickable
PiperOrigin-RevId: 368818853
This commit is contained in:
parent
2cc51db54a
commit
33f3e5fca0
@ -436,7 +436,11 @@ 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
|
||||
// click events up to the PlayerView by calling their own performClick method.
|
||||
surfaceView.setOnClickListener(componentListener);
|
||||
surfaceView.setClickable(false);
|
||||
contentFrame.addView(surfaceView, 0);
|
||||
} else {
|
||||
surfaceView = null;
|
||||
|
@ -443,7 +443,11 @@ public class StyledPlayerView extends FrameLayout implements AdViewProvider {
|
||||
break;
|
||||
}
|
||||
surfaceView.setLayoutParams(params);
|
||||
// We don't want surfaceView to be clickable separately to the StyledPlayerView itself, but we
|
||||
// do want to register as an OnClickListener so that surfaceView implementations can propagate
|
||||
// click events up to the StyledPlayerView by calling their own performClick method.
|
||||
surfaceView.setOnClickListener(componentListener);
|
||||
surfaceView.setClickable(false);
|
||||
contentFrame.addView(surfaceView, 0);
|
||||
} else {
|
||||
surfaceView = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user