Commit 33f3e5fc by olly Committed by Oliver Woodman

Make surfaceView non-clickable

PiperOrigin-RevId: 368818853
parent 2cc51db5
......@@ -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;
......
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