Search in sources :

Example 71 with ObjectAnimator

use of com.nineoldandroids.animation.ObjectAnimator in project MaterialDesignLibrary by navasmdc.

the class ButtonFloat method hide.

public void hide() {
    ObjectAnimator animator = ObjectAnimator.ofFloat(ButtonFloat.this, "y", hidePosition);
    animator.setInterpolator(new BounceInterpolator());
    animator.setDuration(1500);
    animator.start();
    isShow = false;
}
Also used : ObjectAnimator(com.nineoldandroids.animation.ObjectAnimator) BounceInterpolator(android.view.animation.BounceInterpolator)

Example 72 with ObjectAnimator

use of com.nineoldandroids.animation.ObjectAnimator in project AndroidSweetSheet by zzz40500.

the class IndicatorView method alphaDismiss.

public void alphaDismiss(boolean isAnimation) {
    if (isAnimation) {
        ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(this, "alpha", 1, 0);
        objectAnimator.setDuration(300);
        objectAnimator.start();
    } else {
        ViewHelper.setAlpha(this, 0);
    }
}
Also used : ObjectAnimator(com.nineoldandroids.animation.ObjectAnimator)

Example 73 with ObjectAnimator

use of com.nineoldandroids.animation.ObjectAnimator in project AndroidSweetSheet by zzz40500.

the class CustomDelegate method alphaAnimation.

private void alphaAnimation() {
    ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(getContentRelativeLayout(), "alpha", 0, 1);
    objectAnimator.setDuration(1200);
    objectAnimator.setInterpolator(new DecelerateInterpolator());
    objectAnimator.start();
}
Also used : DecelerateInterpolator(android.view.animation.DecelerateInterpolator) ObjectAnimator(com.nineoldandroids.animation.ObjectAnimator)

Example 74 with ObjectAnimator

use of com.nineoldandroids.animation.ObjectAnimator in project AndroidSweetSheet by zzz40500.

the class Delegate method dismiss.

/**
     * 消失
     */
protected void dismiss() {
    if (getStatus() == SweetSheet.Status.DISMISS) {
        return;
    }
    mBg.setClickable(false);
    dismissShowdown();
    ObjectAnimator translationOut = ObjectAnimator.ofFloat(mRootView, "translationY", 0, mRootView.getHeight());
    translationOut.setDuration(600);
    translationOut.setInterpolator(new DecelerateInterpolator());
    translationOut.addListener(new SimpleAnimationListener() {

        @Override
        public void onAnimationStart(Animator animation) {
            mStatus = SweetSheet.Status.DISMISSING;
        }

        @Override
        public void onAnimationEnd(Animator animation) {
            mStatus = SweetSheet.Status.DISMISS;
            mParentVG.removeView(mRootView);
        }
    });
    translationOut.start();
}
Also used : DecelerateInterpolator(android.view.animation.DecelerateInterpolator) ObjectAnimator(com.nineoldandroids.animation.ObjectAnimator) Animator(com.nineoldandroids.animation.Animator) ObjectAnimator(com.nineoldandroids.animation.ObjectAnimator) SimpleAnimationListener(com.mingle.SimpleAnimationListener)

Example 75 with ObjectAnimator

use of com.nineoldandroids.animation.ObjectAnimator in project AndroidSweetSheet by zzz40500.

the class Delegate method showShowdown.

/**
     * 显示模糊背景
     */
protected void showShowdown() {
    ViewHelper.setTranslationY(mRootView, 0);
    mEffect.effect(mParentVG, mBg);
    ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
    if (mBg.getParent() != null) {
        mParentVG.removeView(mBg);
    }
    mParentVG.addView(mBg, lp);
    ViewHelper.setAlpha(mBg, 0);
    ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(mBg, "alpha", 0, 1);
    objectAnimator.setDuration(400);
    objectAnimator.start();
}
Also used : ViewGroup(android.view.ViewGroup) ObjectAnimator(com.nineoldandroids.animation.ObjectAnimator)

Aggregations

ObjectAnimator (com.nineoldandroids.animation.ObjectAnimator)81 AnimatorSet (com.nineoldandroids.animation.AnimatorSet)27 Animator (com.nineoldandroids.animation.Animator)20 View (android.view.View)11 PropertyValuesHolder (com.nineoldandroids.animation.PropertyValuesHolder)10 Keyframe (com.nineoldandroids.animation.Keyframe)9 Paint (android.graphics.Paint)8 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)8 AccelerateInterpolator (android.view.animation.AccelerateInterpolator)6 TextView (android.widget.TextView)5 AdapterView (android.widget.AdapterView)4 AnimatorListenerAdapter (com.nineoldandroids.animation.AnimatorListenerAdapter)4 SuppressLint (android.annotation.SuppressLint)3 TargetApi (android.annotation.TargetApi)3 LinearInterpolator (android.view.animation.LinearInterpolator)3 OvershootInterpolator (android.view.animation.OvershootInterpolator)3 AbsListView (android.widget.AbsListView)3 ListView (android.widget.ListView)3 ValueAnimator (com.nineoldandroids.animation.ValueAnimator)3 SupportAnimator (io.codetail.animation.SupportAnimator)3