Fix issue with non-appearing controls

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-01-19 19:39:58 +01:00
parent c1222bf491
commit 01482ce8a6

View File

@ -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();
}
}
}