Search in sources :

Example 1 with ConstraintSet

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

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 2 with ConstraintSet

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

the class ContactSelectionListFragment method setChipGroupVisibility.

private void setChipGroupVisibility(int visibility) {
    if (!safeArguments().getBoolean(DISPLAY_CHIPS, requireActivity().getIntent().getBooleanExtra(DISPLAY_CHIPS, true))) {
        return;
    }
    AutoTransition transition = new AutoTransition();
    transition.setDuration(CHIP_GROUP_REVEAL_DURATION_MS);
    transition.excludeChildren(recyclerView, true);
    transition.excludeTarget(recyclerView, true);
    TransitionManager.beginDelayedTransition(constraintLayout, transition);
    ConstraintSet constraintSet = new ConstraintSet();
    constraintSet.clone(constraintLayout);
    constraintSet.setVisibility(R.id.chipGroupScrollContainer, visibility);
    constraintSet.applyTo(constraintLayout);
}
Also used : AutoTransition(androidx.transition.AutoTransition) ConstraintSet(androidx.constraintlayout.widget.ConstraintSet)

Example 3 with ConstraintSet

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

the class CreatePaymentFragment method initializeConstraintSets.

private void initializeConstraintSets() {
    cryptoConstraintSet = new ConstraintSet();
    cryptoConstraintSet.clone(constraintLayout);
    fiatConstraintSet = new ConstraintSet();
    fiatConstraintSet.clone(getContext(), R.layout.create_payment_fragment_amount_toggle);
}
Also used : ConstraintSet(androidx.constraintlayout.widget.ConstraintSet)

Example 4 with ConstraintSet

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

the class WebRtcCallView method fadeControls.

private void fadeControls(int visibility) {
    controlsVisible = visibility == VISIBLE;
    Transition transition = new AutoTransition().setOrdering(TransitionSet.ORDERING_TOGETHER).setDuration(TRANSITION_DURATION_MILLIS);
    TransitionManager.endTransitions(parent);
    if (controlsListener != null) {
        if (controlsVisible) {
            controlsListener.showSystemUI();
        } else {
            controlsListener.hideSystemUI();
        }
    }
    TransitionManager.beginDelayedTransition(parent, transition);
    ConstraintSet constraintSet = new ConstraintSet();
    constraintSet.clone(parent);
    for (View view : controlsToFade()) {
        constraintSet.setVisibility(view.getId(), visibility);
    }
    adjustParticipantsRecycler(constraintSet);
    constraintSet.applyTo(parent);
    layoutParticipants();
}
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 5 with ConstraintSet

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

the class WebRtcCallView method layoutParticipants.

private void layoutParticipants() {
    Transition transition = new AutoTransition().setDuration(TRANSITION_DURATION_MILLIS);
    TransitionManager.beginDelayedTransition(participantsParent, transition);
    ConstraintSet constraintSet = new ConstraintSet();
    constraintSet.clone(participantsParent);
    constraintSet.setMargin(R.id.call_screen_participants_pager, ConstraintSet.BOTTOM, ViewUtil.dpToPx(withControlsHeight(pagerBottomMarginDp)));
    constraintSet.applyTo(participantsParent);
}
Also used : AutoTransition(androidx.transition.AutoTransition) Transition(androidx.transition.Transition) AutoTransition(androidx.transition.AutoTransition) ConstraintSet(androidx.constraintlayout.widget.ConstraintSet)

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