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;
}
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);
}
}
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();
}
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();
}
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();
}
Aggregations