use of com.nineoldandroids.animation.AnimatorSet in project AndroidResideMenu by SpecialCyCi.
the class ResideMenu method buildMenuAnimation.
private AnimatorSet buildMenuAnimation(View target, float alpha) {
AnimatorSet alphaAnimation = new AnimatorSet();
alphaAnimation.playTogether(ObjectAnimator.ofFloat(target, "alpha", alpha));
alphaAnimation.setDuration(250);
return alphaAnimation;
}
use of com.nineoldandroids.animation.AnimatorSet in project AndroidResideMenu by SpecialCyCi.
the class ResideMenu method buildScaleUpAnimation.
/**
* A helper method to build scale up animation;
*
* @param target
* @param targetScaleX
* @param targetScaleY
* @return
*/
private AnimatorSet buildScaleUpAnimation(View target, float targetScaleX, float targetScaleY) {
AnimatorSet scaleUp = new AnimatorSet();
scaleUp.playTogether(ObjectAnimator.ofFloat(target, "scaleX", targetScaleX), ObjectAnimator.ofFloat(target, "scaleY", targetScaleY));
if (mUse3D) {
scaleUp.playTogether(ObjectAnimator.ofFloat(target, "rotationY", 0));
}
scaleUp.setDuration(250);
return scaleUp;
}
use of com.nineoldandroids.animation.AnimatorSet in project AndroidResideMenu by SpecialCyCi.
the class ResideMenu method buildScaleDownAnimation.
/**
* A helper method to build scale down animation;
*
* @param target
* @param targetScaleX
* @param targetScaleY
* @return
*/
private AnimatorSet buildScaleDownAnimation(View target, float targetScaleX, float targetScaleY) {
AnimatorSet scaleDown = new AnimatorSet();
scaleDown.playTogether(ObjectAnimator.ofFloat(target, "scaleX", targetScaleX), ObjectAnimator.ofFloat(target, "scaleY", targetScaleY));
if (mUse3D) {
int angle = scaleDirection == DIRECTION_LEFT ? -ROTATE_Y_ANGLE : ROTATE_Y_ANGLE;
scaleDown.playTogether(ObjectAnimator.ofFloat(target, "rotationY", angle));
}
scaleDown.setInterpolator(AnimationUtils.loadInterpolator(activity, android.R.anim.decelerate_interpolator));
scaleDown.setDuration(250);
return scaleDown;
}
use of com.nineoldandroids.animation.AnimatorSet in project ElasticDownload by Tibolte.
the class ProgressDownloadView method drawFail.
public void drawFail() {
mState = State.STATE_FAILED;
ObjectAnimator failAnim = ObjectAnimator.ofFloat(this, "failAngle", 0, 180);
failAnim.setInterpolator(new OvershootInterpolator());
//This one doesn't do much actually, we just use it to take advantage of associating two different interpolators
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "progress", getProgress(), mTarget);
anim.setInterpolator(new AccelerateInterpolator());
AnimatorSet set = new AnimatorSet();
set.setDuration((long) (ANIMATION_DURATION_BASE / 1.7f));
set.playTogether(failAnim, anim);
set.start();
}
use of com.nineoldandroids.animation.AnimatorSet in project PhotoNoter by yydcdut.
the class PhotoDetailActivity method hideWidget.
@Override
public void hideWidget(final IPhotoDetailPresenter.OnAnimationAdapter onAnimationAdapter) {
AnimatorSet animation = new AnimatorSet();
animation.setDuration(1000);
animation.playTogether(ObjectAnimator.ofFloat(mAppBarLayout, "Y", AppCompat.AFTER_LOLLIPOP ? getStatusBarSize() : 0, -getActionBarSize() - (AppCompat.AFTER_LOLLIPOP ? getStatusBarSize() : 0)), ObjectAnimator.ofFloat(mBottomLayout, "Y", mBottomLayout.getTop(), mBottomLayout.getTop() + getActionBarSize()), ObjectAnimator.ofFloat(mStatusCoverView, "Y", 0f, -getActionBarSize()));
animation.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
if (onAnimationAdapter != null) {
onAnimationAdapter.onAnimationStarted(IPhotoDetailPresenter.STATE_HIDE);
}
}
@Override
public void onAnimationEnd(Animator animation) {
if (onAnimationAdapter != null) {
onAnimationAdapter.onAnimationEnded(IPhotoDetailPresenter.STATE_HIDE);
}
}
});
animation.start();
}
Aggregations