Search in sources :

Example 6 with ConstraintSet

use of androidx.constraintlayout.widget.ConstraintSet in project Signal-Android by WhisperSystems.

the class WebRtcCallView method onFinishInflate.

@SuppressWarnings("CodeBlock2Expr")
@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    audioToggle = findViewById(R.id.call_screen_speaker_toggle);
    audioToggleLabel = findViewById(R.id.call_screen_speaker_toggle_label);
    videoToggle = findViewById(R.id.call_screen_video_toggle);
    videoToggleLabel = findViewById(R.id.call_screen_video_toggle_label);
    micToggle = findViewById(R.id.call_screen_audio_mic_toggle);
    micToggleLabel = findViewById(R.id.call_screen_audio_mic_toggle_label);
    smallLocalRenderFrame = findViewById(R.id.call_screen_pip);
    smallLocalRender = findViewById(R.id.call_screen_small_local_renderer);
    largeLocalRenderFrame = findViewById(R.id.call_screen_large_local_renderer_frame);
    largeLocalRender = findViewById(R.id.call_screen_large_local_renderer);
    largeLocalRenderNoVideo = findViewById(R.id.call_screen_large_local_video_off);
    largeLocalRenderNoVideoAvatar = findViewById(R.id.call_screen_large_local_video_off_avatar);
    recipientName = findViewById(R.id.call_screen_recipient_name);
    status = findViewById(R.id.call_screen_status);
    incomingRingStatus = findViewById(R.id.call_screen_incoming_ring_status);
    parent = findViewById(R.id.call_screen);
    participantsParent = findViewById(R.id.call_screen_participants_parent);
    answer = findViewById(R.id.call_screen_answer_call);
    cameraDirectionToggle = findViewById(R.id.call_screen_camera_direction_toggle);
    cameraDirectionToggleLabel = findViewById(R.id.call_screen_camera_direction_toggle_label);
    ringToggle = findViewById(R.id.call_screen_audio_ring_toggle);
    ringToggleLabel = findViewById(R.id.call_screen_audio_ring_toggle_label);
    hangup = findViewById(R.id.call_screen_end_call);
    hangupLabel = findViewById(R.id.call_screen_end_call_label);
    answerWithoutVideo = findViewById(R.id.call_screen_answer_without_video);
    answerWithoutVideoLabel = findViewById(R.id.call_screen_answer_without_video_label);
    topGradient = findViewById(R.id.call_screen_header_gradient);
    footerGradient = findViewById(R.id.call_screen_footer_gradient);
    startCallControls = findViewById(R.id.call_screen_start_call_controls);
    callParticipantsPager = findViewById(R.id.call_screen_participants_pager);
    callParticipantsRecycler = findViewById(R.id.call_screen_participants_recycler);
    toolbar = findViewById(R.id.call_screen_header);
    startCall = findViewById(R.id.call_screen_start_call_start_call);
    errorButton = findViewById(R.id.call_screen_error_cancel);
    groupCallSpeakerHint = new Stub<>(findViewById(R.id.call_screen_group_call_speaker_hint));
    groupCallFullStub = new Stub<>(findViewById(R.id.group_call_call_full_view));
    showParticipantsGuideline = findViewById(R.id.call_screen_show_participants_guideline);
    topFoldGuideline = findViewById(R.id.fold_top_guideline);
    callScreenTopFoldGuideline = findViewById(R.id.fold_top_call_screen_guideline);
    foldParticipantCountWrapper = findViewById(R.id.fold_show_participants_menu_counter_wrapper);
    foldParticipantCount = findViewById(R.id.fold_show_participants_menu_counter);
    largeHeaderAvatar = findViewById(R.id.call_screen_header_avatar);
    statusBarGuideline = findViewById(R.id.call_screen_status_bar_guideline);
    fullScreenShade = findViewById(R.id.call_screen_full_shade);
    View decline = findViewById(R.id.call_screen_decline_call);
    View answerLabel = findViewById(R.id.call_screen_answer_call_label);
    View declineLabel = findViewById(R.id.call_screen_decline_call_label);
    callParticipantsPager.setPageTransformer(new MarginPageTransformer(ViewUtil.dpToPx(4)));
    pagerAdapter = new WebRtcCallParticipantsPagerAdapter(this::toggleControls);
    recyclerAdapter = new WebRtcCallParticipantsRecyclerAdapter();
    callParticipantsPager.setAdapter(pagerAdapter);
    callParticipantsRecycler.setAdapter(recyclerAdapter);
    callParticipantsPager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {

        @Override
        public void onPageSelected(int position) {
            runIfNonNull(controlsListener, listener -> listener.onPageChanged(position == 0 ? CallParticipantsState.SelectedPage.GRID : CallParticipantsState.SelectedPage.FOCUSED));
        }
    });
    topViews.add(toolbar);
    topViews.add(topGradient);
    incomingCallViews.add(answer);
    incomingCallViews.add(answerLabel);
    incomingCallViews.add(decline);
    incomingCallViews.add(declineLabel);
    incomingCallViews.add(footerGradient);
    incomingCallViews.add(incomingRingStatus);
    adjustableMarginsSet.add(micToggle);
    adjustableMarginsSet.add(cameraDirectionToggle);
    adjustableMarginsSet.add(videoToggle);
    adjustableMarginsSet.add(audioToggle);
    audioToggle.setOnAudioOutputChangedListener(outputMode -> {
        runIfNonNull(controlsListener, listener -> listener.onAudioOutputChanged(outputMode));
    });
    videoToggle.setOnCheckedChangeListener((v, isOn) -> {
        runIfNonNull(controlsListener, listener -> listener.onVideoChanged(isOn));
    });
    micToggle.setOnCheckedChangeListener((v, isOn) -> {
        runIfNonNull(controlsListener, listener -> listener.onMicChanged(isOn));
    });
    ringToggle.setOnCheckedChangeListener((v, isOn) -> {
        runIfNonNull(controlsListener, listener -> listener.onRingGroupChanged(isOn, ringToggle.isActivated()));
    });
    cameraDirectionToggle.setOnClickListener(v -> runIfNonNull(controlsListener, ControlsListener::onCameraDirectionChanged));
    hangup.setOnClickListener(v -> runIfNonNull(controlsListener, ControlsListener::onEndCallPressed));
    decline.setOnClickListener(v -> runIfNonNull(controlsListener, ControlsListener::onDenyCallPressed));
    answer.setOnClickListener(v -> runIfNonNull(controlsListener, ControlsListener::onAcceptCallPressed));
    answerWithoutVideo.setOnClickListener(v -> runIfNonNull(controlsListener, ControlsListener::onAcceptCallWithVoiceOnlyPressed));
    pictureInPictureGestureHelper = PictureInPictureGestureHelper.applyTo(smallLocalRenderFrame);
    pictureInPictureExpansionHelper = new PictureInPictureExpansionHelper();
    smallLocalRenderFrame.setOnClickListener(v -> {
        if (controlsListener != null) {
            controlsListener.onLocalPictureInPictureClicked();
        }
    });
    startCall.setOnClickListener(v -> {
        if (controlsListener != null) {
            startCall.setEnabled(false);
            controlsListener.onStartCall(videoToggle.isChecked());
        }
    });
    ColorMatrix greyScaleMatrix = new ColorMatrix();
    greyScaleMatrix.setSaturation(0);
    largeLocalRenderNoVideoAvatar.setAlpha(0.6f);
    largeLocalRenderNoVideoAvatar.setColorFilter(new ColorMatrixColorFilter(greyScaleMatrix));
    errorButton.setOnClickListener(v -> {
        if (controlsListener != null) {
            controlsListener.onCancelStartCall();
        }
    });
    rotatableControls.add(hangup);
    rotatableControls.add(answer);
    rotatableControls.add(answerWithoutVideo);
    rotatableControls.add(audioToggle);
    rotatableControls.add(micToggle);
    rotatableControls.add(videoToggle);
    rotatableControls.add(cameraDirectionToggle);
    rotatableControls.add(decline);
    rotatableControls.add(smallLocalRender.findViewById(R.id.call_participant_mic_muted));
    rotatableControls.add(ringToggle);
    largeHeaderConstraints = new ConstraintSet();
    largeHeaderConstraints.clone(getContext(), R.layout.webrtc_call_view_header_large);
    smallHeaderConstraints = new ConstraintSet();
    smallHeaderConstraints.clone(getContext(), R.layout.webrtc_call_view_header_small);
}
Also used : Rect(android.graphics.Rect) NonNull(androidx.annotation.NonNull) FrameLayout(android.widget.FrameLayout) ImageView(android.widget.ImageView) TransitionManager(androidx.transition.TransitionManager) ProfileContactPhoto(org.thoughtcrime.securesms.contacts.avatars.ProfileContactPhoto) ViewUtil(org.thoughtcrime.securesms.util.ViewUtil) CallParticipant(org.thoughtcrime.securesms.events.CallParticipant) R(org.thoughtcrime.securesms.R) AttributeSet(android.util.AttributeSet) RecipientId(org.thoughtcrime.securesms.recipients.RecipientId) SimpleAnimationListener(org.thoughtcrime.securesms.mediasend.SimpleAnimationListener) AccessibleToggleButton(org.thoughtcrime.securesms.components.AccessibleToggleButton) View(android.view.View) Recipient(org.thoughtcrime.securesms.recipients.Recipient) Animation(android.view.animation.Animation) RecyclerView(androidx.recyclerview.widget.RecyclerView) ColorMatrix(android.graphics.ColorMatrix) ResizeAnimation(org.thoughtcrime.securesms.animation.ResizeAnimation) MarginPageTransformer(androidx.viewpager2.widget.MarginPageTransformer) Set(java.util.Set) ColorMatrixColorFilter(android.graphics.ColorMatrixColorFilter) SetUtil(org.thoughtcrime.securesms.util.SetUtil) ViewGroup(android.view.ViewGroup) Sets(com.google.common.collect.Sets) Consumer(androidx.core.util.Consumer) TransitionSet(androidx.transition.TransitionSet) List(java.util.List) TextView(android.widget.TextView) Nullable(androidx.annotation.Nullable) ConstraintLayout(androidx.constraintlayout.widget.ConstraintLayout) Transition(androidx.transition.Transition) GlideApp(org.thoughtcrime.securesms.mms.GlideApp) Context(android.content.Context) AppCompatResources(androidx.appcompat.content.res.AppCompatResources) BlurTransformation(org.thoughtcrime.securesms.util.BlurTransformation) RendererCommon(org.webrtc.RendererCommon) ViewPager2(androidx.viewpager2.widget.ViewPager2) CallParticipantsViewState(org.thoughtcrime.securesms.webrtc.CallParticipantsViewState) AutoTransition(androidx.transition.AutoTransition) CenterCrop(com.bumptech.glide.load.resource.bitmap.CenterCrop) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) CameraState(org.thoughtcrime.securesms.ringrtc.CameraState) MaterialButton(com.google.android.material.button.MaterialButton) HangupMessage(org.whispersystems.signalservice.api.messages.calls.HangupMessage) DiskCacheStrategy(com.bumptech.glide.load.engine.DiskCacheStrategy) AvatarImageView(org.thoughtcrime.securesms.components.AvatarImageView) Stub(org.thoughtcrime.securesms.util.views.Stub) WebRtcViewModel(org.thoughtcrime.securesms.events.WebRtcViewModel) Point(android.graphics.Point) ConstraintSet(androidx.constraintlayout.widget.ConstraintSet) ThrottledDebouncer(org.thoughtcrime.securesms.util.ThrottledDebouncer) Guideline(androidx.constraintlayout.widget.Guideline) ColorMatrix(android.graphics.ColorMatrix) ConstraintSet(androidx.constraintlayout.widget.ConstraintSet) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) AvatarImageView(org.thoughtcrime.securesms.components.AvatarImageView) Point(android.graphics.Point) ViewPager2(androidx.viewpager2.widget.ViewPager2) ColorMatrixColorFilter(android.graphics.ColorMatrixColorFilter) MarginPageTransformer(androidx.viewpager2.widget.MarginPageTransformer)

Example 7 with ConstraintSet

use of androidx.constraintlayout.widget.ConstraintSet in project Signal-Android by WhisperSystems.

the class WebRtcCallView method fadeInNewUiState.

private void fadeInNewUiState(boolean useSmallMargins, boolean showSmallHeader) {
    Transition transition = new AutoTransition().setDuration(TRANSITION_DURATION_MILLIS);
    TransitionManager.beginDelayedTransition(parent, transition);
    ConstraintSet constraintSet = new ConstraintSet();
    constraintSet.clone(parent);
    for (View view : SetUtil.difference(allTimeVisibleViews, visibleViewSet)) {
        constraintSet.setVisibility(view.getId(), ConstraintSet.GONE);
    }
    for (View view : visibleViewSet) {
        constraintSet.setVisibility(view.getId(), ConstraintSet.VISIBLE);
        if (adjustableMarginsSet.contains(view)) {
            constraintSet.setMargin(view.getId(), ConstraintSet.END, ViewUtil.dpToPx(useSmallMargins ? SMALL_ONGOING_CALL_BUTTON_MARGIN_DP : LARGE_ONGOING_CALL_BUTTON_MARGIN_DP));
        }
    }
    adjustParticipantsRecycler(constraintSet);
    constraintSet.applyTo(parent);
    if (showSmallHeader) {
        smallHeaderConstraints.setVisibility(incomingRingStatus.getId(), visibleViewSet.contains(incomingRingStatus) ? View.VISIBLE : View.GONE);
        smallHeaderConstraints.applyTo(toolbar);
    } else {
        largeHeaderConstraints.setVisibility(incomingRingStatus.getId(), visibleViewSet.contains(incomingRingStatus) ? View.VISIBLE : View.GONE);
        largeHeaderConstraints.applyTo(toolbar);
    }
}
Also used : AutoTransition(androidx.transition.AutoTransition) Transition(androidx.transition.Transition) AutoTransition(androidx.transition.AutoTransition) ConstraintSet(androidx.constraintlayout.widget.ConstraintSet) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) AvatarImageView(org.thoughtcrime.securesms.components.AvatarImageView)

Example 8 with ConstraintSet

use of androidx.constraintlayout.widget.ConstraintSet in project Signal-Android by signalapp.

the class ConversationItemFooter method showPlaybackSpeedToggle.

private void showPlaybackSpeedToggle() {
    if (hasShrunkDate) {
        return;
    }
    hasShrunkDate = true;
    playbackSpeedToggleTextView.animate().alpha(1f).scaleX(1f).scaleY(1f).setDuration(150L).setListener(new AnimationCompleteListener() {

        @Override
        public void onAnimationEnd(Animator animation) {
            playbackSpeedToggleTextView.setClickable(true);
        }
    });
    if (isOutgoing) {
        dateView.setMaxWidth(ViewUtil.dpToPx(28));
    } else {
        ConstraintSet constraintSet = new ConstraintSet();
        constraintSet.clone(this);
        constraintSet.constrainMaxWidth(R.id.date_and_expiry_wrapper, ViewUtil.dpToPx(40));
        constraintSet.applyTo(this);
    }
}
Also used : Animator(android.animation.Animator) ConstraintSet(androidx.constraintlayout.widget.ConstraintSet) AnimationCompleteListener(org.thoughtcrime.securesms.animation.AnimationCompleteListener)

Example 9 with ConstraintSet

use of androidx.constraintlayout.widget.ConstraintSet in project Signal-Android by signalapp.

the class ConversationItemFooter method hidePlaybackSpeedToggle.

private void hidePlaybackSpeedToggle() {
    if (!hasShrunkDate) {
        return;
    }
    hasShrunkDate = false;
    playbackSpeedToggleTextView.animate().alpha(0f).scaleX(0.5f).scaleY(0.5f).setDuration(150L).setListener(new AnimationCompleteListener() {

        @Override
        public void onAnimationEnd(Animator animation) {
            playbackSpeedToggleTextView.setClickable(false);
            playbackSpeedToggleTextView.clearRequestedSpeed();
        }
    });
    if (isOutgoing) {
        dateView.setMaxWidth(Integer.MAX_VALUE);
    } else {
        ConstraintSet constraintSet = new ConstraintSet();
        constraintSet.clone(this);
        constraintSet.constrainMaxWidth(R.id.date_and_expiry_wrapper, -1);
        constraintSet.applyTo(this);
    }
}
Also used : Animator(android.animation.Animator) ConstraintSet(androidx.constraintlayout.widget.ConstraintSet) AnimationCompleteListener(org.thoughtcrime.securesms.animation.AnimationCompleteListener)

Example 10 with ConstraintSet

use of androidx.constraintlayout.widget.ConstraintSet in project Signal-Android by signalapp.

the class WebRtcCallView method onFinishInflate.

@SuppressWarnings("CodeBlock2Expr")
@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    audioToggle = findViewById(R.id.call_screen_speaker_toggle);
    audioToggleLabel = findViewById(R.id.call_screen_speaker_toggle_label);
    videoToggle = findViewById(R.id.call_screen_video_toggle);
    videoToggleLabel = findViewById(R.id.call_screen_video_toggle_label);
    micToggle = findViewById(R.id.call_screen_audio_mic_toggle);
    micToggleLabel = findViewById(R.id.call_screen_audio_mic_toggle_label);
    smallLocalRenderFrame = findViewById(R.id.call_screen_pip);
    smallLocalRender = findViewById(R.id.call_screen_small_local_renderer);
    largeLocalRenderFrame = findViewById(R.id.call_screen_large_local_renderer_frame);
    largeLocalRender = findViewById(R.id.call_screen_large_local_renderer);
    largeLocalRenderNoVideo = findViewById(R.id.call_screen_large_local_video_off);
    largeLocalRenderNoVideoAvatar = findViewById(R.id.call_screen_large_local_video_off_avatar);
    recipientName = findViewById(R.id.call_screen_recipient_name);
    status = findViewById(R.id.call_screen_status);
    incomingRingStatus = findViewById(R.id.call_screen_incoming_ring_status);
    parent = findViewById(R.id.call_screen);
    participantsParent = findViewById(R.id.call_screen_participants_parent);
    answer = findViewById(R.id.call_screen_answer_call);
    cameraDirectionToggle = findViewById(R.id.call_screen_camera_direction_toggle);
    cameraDirectionToggleLabel = findViewById(R.id.call_screen_camera_direction_toggle_label);
    ringToggle = findViewById(R.id.call_screen_audio_ring_toggle);
    ringToggleLabel = findViewById(R.id.call_screen_audio_ring_toggle_label);
    hangup = findViewById(R.id.call_screen_end_call);
    hangupLabel = findViewById(R.id.call_screen_end_call_label);
    answerWithoutVideo = findViewById(R.id.call_screen_answer_without_video);
    answerWithoutVideoLabel = findViewById(R.id.call_screen_answer_without_video_label);
    topGradient = findViewById(R.id.call_screen_header_gradient);
    footerGradient = findViewById(R.id.call_screen_footer_gradient);
    startCallControls = findViewById(R.id.call_screen_start_call_controls);
    callParticipantsPager = findViewById(R.id.call_screen_participants_pager);
    callParticipantsRecycler = findViewById(R.id.call_screen_participants_recycler);
    toolbar = findViewById(R.id.call_screen_header);
    startCall = findViewById(R.id.call_screen_start_call_start_call);
    errorButton = findViewById(R.id.call_screen_error_cancel);
    groupCallSpeakerHint = new Stub<>(findViewById(R.id.call_screen_group_call_speaker_hint));
    groupCallFullStub = new Stub<>(findViewById(R.id.group_call_call_full_view));
    showParticipantsGuideline = findViewById(R.id.call_screen_show_participants_guideline);
    topFoldGuideline = findViewById(R.id.fold_top_guideline);
    callScreenTopFoldGuideline = findViewById(R.id.fold_top_call_screen_guideline);
    foldParticipantCountWrapper = findViewById(R.id.fold_show_participants_menu_counter_wrapper);
    foldParticipantCount = findViewById(R.id.fold_show_participants_menu_counter);
    largeHeaderAvatar = findViewById(R.id.call_screen_header_avatar);
    statusBarGuideline = findViewById(R.id.call_screen_status_bar_guideline);
    fullScreenShade = findViewById(R.id.call_screen_full_shade);
    View decline = findViewById(R.id.call_screen_decline_call);
    View answerLabel = findViewById(R.id.call_screen_answer_call_label);
    View declineLabel = findViewById(R.id.call_screen_decline_call_label);
    callParticipantsPager.setPageTransformer(new MarginPageTransformer(ViewUtil.dpToPx(4)));
    pagerAdapter = new WebRtcCallParticipantsPagerAdapter(this::toggleControls);
    recyclerAdapter = new WebRtcCallParticipantsRecyclerAdapter();
    callParticipantsPager.setAdapter(pagerAdapter);
    callParticipantsRecycler.setAdapter(recyclerAdapter);
    callParticipantsPager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {

        @Override
        public void onPageSelected(int position) {
            runIfNonNull(controlsListener, listener -> listener.onPageChanged(position == 0 ? CallParticipantsState.SelectedPage.GRID : CallParticipantsState.SelectedPage.FOCUSED));
        }
    });
    topViews.add(toolbar);
    topViews.add(topGradient);
    incomingCallViews.add(answer);
    incomingCallViews.add(answerLabel);
    incomingCallViews.add(decline);
    incomingCallViews.add(declineLabel);
    incomingCallViews.add(footerGradient);
    incomingCallViews.add(incomingRingStatus);
    adjustableMarginsSet.add(micToggle);
    adjustableMarginsSet.add(cameraDirectionToggle);
    adjustableMarginsSet.add(videoToggle);
    adjustableMarginsSet.add(audioToggle);
    audioToggle.setOnAudioOutputChangedListener(outputMode -> {
        runIfNonNull(controlsListener, listener -> listener.onAudioOutputChanged(outputMode));
    });
    videoToggle.setOnCheckedChangeListener((v, isOn) -> {
        runIfNonNull(controlsListener, listener -> listener.onVideoChanged(isOn));
    });
    micToggle.setOnCheckedChangeListener((v, isOn) -> {
        runIfNonNull(controlsListener, listener -> listener.onMicChanged(isOn));
    });
    ringToggle.setOnCheckedChangeListener((v, isOn) -> {
        runIfNonNull(controlsListener, listener -> listener.onRingGroupChanged(isOn, ringToggle.isActivated()));
    });
    cameraDirectionToggle.setOnClickListener(v -> runIfNonNull(controlsListener, ControlsListener::onCameraDirectionChanged));
    hangup.setOnClickListener(v -> runIfNonNull(controlsListener, ControlsListener::onEndCallPressed));
    decline.setOnClickListener(v -> runIfNonNull(controlsListener, ControlsListener::onDenyCallPressed));
    answer.setOnClickListener(v -> runIfNonNull(controlsListener, ControlsListener::onAcceptCallPressed));
    answerWithoutVideo.setOnClickListener(v -> runIfNonNull(controlsListener, ControlsListener::onAcceptCallWithVoiceOnlyPressed));
    pictureInPictureGestureHelper = PictureInPictureGestureHelper.applyTo(smallLocalRenderFrame);
    pictureInPictureExpansionHelper = new PictureInPictureExpansionHelper();
    smallLocalRenderFrame.setOnClickListener(v -> {
        if (controlsListener != null) {
            controlsListener.onLocalPictureInPictureClicked();
        }
    });
    startCall.setOnClickListener(v -> {
        if (controlsListener != null) {
            startCall.setEnabled(false);
            controlsListener.onStartCall(videoToggle.isChecked());
        }
    });
    ColorMatrix greyScaleMatrix = new ColorMatrix();
    greyScaleMatrix.setSaturation(0);
    largeLocalRenderNoVideoAvatar.setAlpha(0.6f);
    largeLocalRenderNoVideoAvatar.setColorFilter(new ColorMatrixColorFilter(greyScaleMatrix));
    errorButton.setOnClickListener(v -> {
        if (controlsListener != null) {
            controlsListener.onCancelStartCall();
        }
    });
    rotatableControls.add(hangup);
    rotatableControls.add(answer);
    rotatableControls.add(answerWithoutVideo);
    rotatableControls.add(audioToggle);
    rotatableControls.add(micToggle);
    rotatableControls.add(videoToggle);
    rotatableControls.add(cameraDirectionToggle);
    rotatableControls.add(decline);
    rotatableControls.add(smallLocalRender.findViewById(R.id.call_participant_mic_muted));
    rotatableControls.add(ringToggle);
    largeHeaderConstraints = new ConstraintSet();
    largeHeaderConstraints.clone(getContext(), R.layout.webrtc_call_view_header_large);
    smallHeaderConstraints = new ConstraintSet();
    smallHeaderConstraints.clone(getContext(), R.layout.webrtc_call_view_header_small);
}
Also used : Rect(android.graphics.Rect) NonNull(androidx.annotation.NonNull) FrameLayout(android.widget.FrameLayout) ImageView(android.widget.ImageView) TransitionManager(androidx.transition.TransitionManager) ProfileContactPhoto(org.thoughtcrime.securesms.contacts.avatars.ProfileContactPhoto) ViewUtil(org.thoughtcrime.securesms.util.ViewUtil) CallParticipant(org.thoughtcrime.securesms.events.CallParticipant) R(org.thoughtcrime.securesms.R) AttributeSet(android.util.AttributeSet) RecipientId(org.thoughtcrime.securesms.recipients.RecipientId) SimpleAnimationListener(org.thoughtcrime.securesms.mediasend.SimpleAnimationListener) AccessibleToggleButton(org.thoughtcrime.securesms.components.AccessibleToggleButton) View(android.view.View) Recipient(org.thoughtcrime.securesms.recipients.Recipient) Animation(android.view.animation.Animation) RecyclerView(androidx.recyclerview.widget.RecyclerView) ColorMatrix(android.graphics.ColorMatrix) ResizeAnimation(org.thoughtcrime.securesms.animation.ResizeAnimation) MarginPageTransformer(androidx.viewpager2.widget.MarginPageTransformer) Set(java.util.Set) ColorMatrixColorFilter(android.graphics.ColorMatrixColorFilter) SetUtil(org.thoughtcrime.securesms.util.SetUtil) ViewGroup(android.view.ViewGroup) Sets(com.google.common.collect.Sets) Consumer(androidx.core.util.Consumer) TransitionSet(androidx.transition.TransitionSet) List(java.util.List) TextView(android.widget.TextView) Nullable(androidx.annotation.Nullable) ConstraintLayout(androidx.constraintlayout.widget.ConstraintLayout) Transition(androidx.transition.Transition) GlideApp(org.thoughtcrime.securesms.mms.GlideApp) Context(android.content.Context) AppCompatResources(androidx.appcompat.content.res.AppCompatResources) BlurTransformation(org.thoughtcrime.securesms.util.BlurTransformation) RendererCommon(org.webrtc.RendererCommon) ViewPager2(androidx.viewpager2.widget.ViewPager2) CallParticipantsViewState(org.thoughtcrime.securesms.webrtc.CallParticipantsViewState) AutoTransition(androidx.transition.AutoTransition) CenterCrop(com.bumptech.glide.load.resource.bitmap.CenterCrop) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) CameraState(org.thoughtcrime.securesms.ringrtc.CameraState) MaterialButton(com.google.android.material.button.MaterialButton) HangupMessage(org.whispersystems.signalservice.api.messages.calls.HangupMessage) DiskCacheStrategy(com.bumptech.glide.load.engine.DiskCacheStrategy) AvatarImageView(org.thoughtcrime.securesms.components.AvatarImageView) Stub(org.thoughtcrime.securesms.util.views.Stub) WebRtcViewModel(org.thoughtcrime.securesms.events.WebRtcViewModel) Point(android.graphics.Point) ConstraintSet(androidx.constraintlayout.widget.ConstraintSet) ThrottledDebouncer(org.thoughtcrime.securesms.util.ThrottledDebouncer) Guideline(androidx.constraintlayout.widget.Guideline) ColorMatrix(android.graphics.ColorMatrix) ConstraintSet(androidx.constraintlayout.widget.ConstraintSet) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) AvatarImageView(org.thoughtcrime.securesms.components.AvatarImageView) Point(android.graphics.Point) ViewPager2(androidx.viewpager2.widget.ViewPager2) ColorMatrixColorFilter(android.graphics.ColorMatrixColorFilter) MarginPageTransformer(androidx.viewpager2.widget.MarginPageTransformer)

Aggregations

ConstraintSet (androidx.constraintlayout.widget.ConstraintSet)19 AutoTransition (androidx.transition.AutoTransition)10 Transition (androidx.transition.Transition)8 ImageView (android.widget.ImageView)7 TextView (android.widget.TextView)7 View (android.view.View)6 RecyclerView (androidx.recyclerview.widget.RecyclerView)6 AvatarImageView (org.thoughtcrime.securesms.components.AvatarImageView)6 Animator (android.animation.Animator)4 AnimationCompleteListener (org.thoughtcrime.securesms.animation.AnimationCompleteListener)4 ConstraintLayout (androidx.constraintlayout.widget.ConstraintLayout)3 Context (android.content.Context)2 ColorMatrix (android.graphics.ColorMatrix)2 ColorMatrixColorFilter (android.graphics.ColorMatrixColorFilter)2 Point (android.graphics.Point)2 Rect (android.graphics.Rect)2 AttributeSet (android.util.AttributeSet)2 ViewGroup (android.view.ViewGroup)2 Animation (android.view.animation.Animation)2 FrameLayout (android.widget.FrameLayout)2