From 01482ce8a669e1dadd9d7f7810a98c07f9f8fdfa Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Fri, 19 Jan 2018 19:39:58 +0100 Subject: [PATCH] Fix issue with non-appearing controls Signed-off-by: Mario Danic --- .../com/nextcloud/talk/activities/CallActivity.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java index 773bf4ef6..ad1fcac34 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java @@ -210,6 +210,7 @@ public class CallActivity extends AppCompatActivity { private boolean isPTTActive = false; private PulseAnimation pulseAnimation; + private View.OnClickListener videoOnClickListener; private static int getSystemUiVisibility() { int flags = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN; @@ -234,6 +235,8 @@ public class CallActivity extends AppCompatActivity { ButterKnife.bind(this); microphoneControlButton.setOnTouchListener(new microphoneButtonTouchListener()); + videoOnClickListener = new videoClickListener(); + pulseAnimation = PulseAnimation.create().with(microphoneControlButton) .setDuration(310) .setRepeatCount(PulseAnimation.INFINITE) @@ -1169,6 +1172,7 @@ public class CallActivity extends AppCompatActivity { // disabled because it causes some devices to crash surfaceViewRenderer.setEnableHardwareScaler(false); surfaceViewRenderer.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FIT); + surfaceViewRenderer.setOnClickListener(videoOnClickListener); VideoRenderer remoteRenderer = new VideoRenderer(surfaceViewRenderer); videoTrack.addRenderer(remoteRenderer); remoteRenderersLayout.addView(relativeLayout); @@ -1469,4 +1473,12 @@ public class CallActivity extends AppCompatActivity { return true; } } + + private class videoClickListener implements View.OnClickListener { + + @Override + public void onClick(View v) { + showCallControls(); + } + } }