Search in sources :

Example 26 with AnimationCompleteListener

use of org.thoughtcrime.securesms.animation.AnimationCompleteListener in project Signal-Android by WhisperSystems.

the class Camera1Fragment method fadeOutControls.

@Override
public void fadeOutControls(@NonNull Runnable onEndAction) {
    controlsContainer.setEnabled(false);
    controlsContainer.animate().setInterpolator(MediaAnimations.getInterpolator()).setDuration(250).alpha(0f).setListener(new AnimationCompleteListener() {

        @Override
        public void onAnimationEnd(Animator animation) {
            controlsContainer.setEnabled(true);
            onEndAction.run();
        }
    });
}
Also used : Animator(android.animation.Animator) AnimationCompleteListener(org.thoughtcrime.securesms.animation.AnimationCompleteListener)

Example 27 with AnimationCompleteListener

use of org.thoughtcrime.securesms.animation.AnimationCompleteListener in project Signal-Android by signalapp.

the class ConversationReactionOverlay method newHideAnimatorSet.

@NonNull
private AnimatorSet newHideAnimatorSet() {
    AnimatorSet set = new AnimatorSet();
    set.addListener(new AnimationCompleteListener() {

        @Override
        public void onAnimationEnd(Animator animation) {
            setVisibility(View.GONE);
        }
    });
    set.setInterpolator(INTERPOLATOR);
    set.playTogether(newHideAnimators());
    return set;
}
Also used : Animator(android.animation.Animator) ObjectAnimator(android.animation.ObjectAnimator) ValueAnimator(android.animation.ValueAnimator) AnimatorSet(android.animation.AnimatorSet) AnimationCompleteListener(org.thoughtcrime.securesms.animation.AnimationCompleteListener) NonNull(androidx.annotation.NonNull)

Example 28 with AnimationCompleteListener

use of org.thoughtcrime.securesms.animation.AnimationCompleteListener in project Signal-Android by signalapp.

the class ConversationReactionOverlay method hideInternal.

private void hideInternal(@Nullable OnHideListener onHideListener) {
    overlayState = OverlayState.HIDDEN;
    AnimatorSet animatorSet = newHideAnimatorSet();
    hideAnimatorSet = animatorSet;
    revealAnimatorSet.end();
    animatorSet.start();
    if (onHideListener != null) {
        onHideListener.startHide();
    }
    if (selectedConversationModel.getFocusedView() != null) {
        ViewUtil.focusAndShowKeyboard(selectedConversationModel.getFocusedView());
    }
    animatorSet.addListener(new AnimationCompleteListener() {

        @Override
        public void onAnimationEnd(Animator animation) {
            animatorSet.removeListener(this);
            toolbarShade.setVisibility(INVISIBLE);
            inputShade.setVisibility(INVISIBLE);
            if (onHideListener != null) {
                onHideListener.onHide();
            }
        }
    });
    if (contextMenu != null) {
        contextMenu.dismiss();
    }
}
Also used : Animator(android.animation.Animator) ObjectAnimator(android.animation.ObjectAnimator) ValueAnimator(android.animation.ValueAnimator) AnimatorSet(android.animation.AnimatorSet) AnimationCompleteListener(org.thoughtcrime.securesms.animation.AnimationCompleteListener)

Aggregations

Animator (android.animation.Animator)28 AnimationCompleteListener (org.thoughtcrime.securesms.animation.AnimationCompleteListener)28 AnimatorSet (android.animation.AnimatorSet)4 ObjectAnimator (android.animation.ObjectAnimator)4 ValueAnimator (android.animation.ValueAnimator)4 View (android.view.View)4 OvershootInterpolator (android.view.animation.OvershootInterpolator)4 NonNull (androidx.annotation.NonNull)4 ConstraintSet (androidx.constraintlayout.widget.ConstraintSet)4 LottieAnimationView (com.airbnb.lottie.LottieAnimationView)4 TextPaint (android.text.TextPaint)3 SuppressLint (android.annotation.SuppressLint)2 Activity (android.app.Activity)2 Point (android.graphics.Point)2 TextView (android.widget.TextView)2 MainThread (androidx.annotation.MainThread)2 RawRes (androidx.annotation.RawRes)2 AlertDialog (androidx.appcompat.app.AlertDialog)2 HintConstants (androidx.autofill.HintConstants)2 ContextCompat (androidx.core.content.ContextCompat)2