mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
rename design for CallActivity
move methods Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
c7e38e4859
commit
3326b6a7f3
@ -54,7 +54,7 @@ import com.nextcloud.talk.adapters.ParticipantDisplayItem;
|
||||
import com.nextcloud.talk.adapters.ParticipantsAdapter;
|
||||
import com.nextcloud.talk.api.NcApi;
|
||||
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
||||
import com.nextcloud.talk.databinding.ControllerCallBinding;
|
||||
import com.nextcloud.talk.databinding.CallActivityBinding;
|
||||
import com.nextcloud.talk.events.ConfigurationChangeEvent;
|
||||
import com.nextcloud.talk.events.MediaStreamEvent;
|
||||
import com.nextcloud.talk.events.NetworkEvent;
|
||||
@ -242,7 +242,7 @@ public class CallActivity extends BaseActivity {
|
||||
|
||||
private Boolean isInPipMode = false;
|
||||
|
||||
private ControllerCallBinding binding;
|
||||
private CallActivityBinding binding;
|
||||
|
||||
@Parcel
|
||||
public enum CallStatus {
|
||||
@ -262,7 +262,7 @@ public class CallActivity extends BaseActivity {
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
|
||||
binding = ControllerCallBinding.inflate(getLayoutInflater());
|
||||
binding = CallActivityBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
Bundle extras = getIntent().getExtras();
|
||||
@ -312,6 +312,43 @@ public class CallActivity extends BaseActivity {
|
||||
initClickListeners();
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
// TODO: move some lines to onCreate!?!
|
||||
|
||||
binding.microphoneButton.setOnTouchListener(new MicrophoneButtonTouchListener());
|
||||
|
||||
pulseAnimation = PulseAnimation.create().with(binding.microphoneButton)
|
||||
.setDuration(310)
|
||||
.setRepeatCount(PulseAnimation.INFINITE)
|
||||
.setRepeatMode(PulseAnimation.REVERSE);
|
||||
|
||||
|
||||
try {
|
||||
cache.evictAll();
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Failed to evict cache");
|
||||
}
|
||||
|
||||
binding.callControls.setZ(100.0f);
|
||||
basicInitialization();
|
||||
participantDisplayItems = new HashMap<>();
|
||||
initViews();
|
||||
updateSelfVideoViewPosition();
|
||||
if (!isConnectionEstablished()){
|
||||
initiateCall();
|
||||
}
|
||||
}
|
||||
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
if (isInPipMode) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
private void initClickListeners() {
|
||||
binding.pictureInPictureButton.setOnClickListener(l -> enterPipMode());
|
||||
|
||||
@ -2380,34 +2417,6 @@ public class CallActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
binding.microphoneButton.setOnTouchListener(new MicrophoneButtonTouchListener());
|
||||
|
||||
pulseAnimation = PulseAnimation.create().with(binding.microphoneButton)
|
||||
.setDuration(310)
|
||||
.setRepeatCount(PulseAnimation.INFINITE)
|
||||
.setRepeatMode(PulseAnimation.REVERSE);
|
||||
|
||||
|
||||
try {
|
||||
cache.evictAll();
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Failed to evict cache");
|
||||
}
|
||||
|
||||
binding.callControls.setZ(100.0f);
|
||||
basicInitialization();
|
||||
participantDisplayItems = new HashMap<>();
|
||||
initViews();
|
||||
updateSelfVideoViewPosition();
|
||||
if (!isConnectionEstablished()){
|
||||
initiateCall();
|
||||
}
|
||||
}
|
||||
|
||||
private class MicrophoneButtonTouchListener implements View.OnTouchListener {
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@ -2505,13 +2514,6 @@ public class CallActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
if (isInPipMode) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
private class SelfVideoTouchListener implements View.OnTouchListener {
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
|
Loading…
Reference in New Issue
Block a user