mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +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.adapters.ParticipantsAdapter;
|
||||||
import com.nextcloud.talk.api.NcApi;
|
import com.nextcloud.talk.api.NcApi;
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
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.ConfigurationChangeEvent;
|
||||||
import com.nextcloud.talk.events.MediaStreamEvent;
|
import com.nextcloud.talk.events.MediaStreamEvent;
|
||||||
import com.nextcloud.talk.events.NetworkEvent;
|
import com.nextcloud.talk.events.NetworkEvent;
|
||||||
@ -242,7 +242,7 @@ public class CallActivity extends BaseActivity {
|
|||||||
|
|
||||||
private Boolean isInPipMode = false;
|
private Boolean isInPipMode = false;
|
||||||
|
|
||||||
private ControllerCallBinding binding;
|
private CallActivityBinding binding;
|
||||||
|
|
||||||
@Parcel
|
@Parcel
|
||||||
public enum CallStatus {
|
public enum CallStatus {
|
||||||
@ -262,7 +262,7 @@ public class CallActivity extends BaseActivity {
|
|||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
|
|
||||||
binding = ControllerCallBinding.inflate(getLayoutInflater());
|
binding = CallActivityBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
Bundle extras = getIntent().getExtras();
|
Bundle extras = getIntent().getExtras();
|
||||||
@ -312,6 +312,43 @@ public class CallActivity extends BaseActivity {
|
|||||||
initClickListeners();
|
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() {
|
private void initClickListeners() {
|
||||||
binding.pictureInPictureButton.setOnClickListener(l -> enterPipMode());
|
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 {
|
private class MicrophoneButtonTouchListener implements View.OnTouchListener {
|
||||||
|
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
@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 {
|
private class SelfVideoTouchListener implements View.OnTouchListener {
|
||||||
|
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
|
Loading…
Reference in New Issue
Block a user