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;
|
break;
|
||||||
}
|
}
|
||||||
surfaceView.setLayoutParams(params);
|
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.setOnClickListener(componentListener);
|
||||||
|
surfaceView.setClickable(false);
|
||||||
contentFrame.addView(surfaceView, 0);
|
contentFrame.addView(surfaceView, 0);
|
||||||
} else {
|
} else {
|
||||||
surfaceView = null;
|
surfaceView = null;
|
||||||
|
@ -443,7 +443,11 @@ public class StyledPlayerView extends FrameLayout implements AdViewProvider {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
surfaceView.setLayoutParams(params);
|
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.setOnClickListener(componentListener);
|
||||||
|
surfaceView.setClickable(false);
|
||||||
contentFrame.addView(surfaceView, 0);
|
contentFrame.addView(surfaceView, 0);
|
||||||
} else {
|
} else {
|
||||||
surfaceView = null;
|
surfaceView = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user