use of com.nineoldandroids.animation.Animator in project PhotoNoter by yydcdut.
the class PhotoDetailActivity method showWidget.
@Override
public void showWidget(final IPhotoDetailPresenter.OnAnimationAdapter onAnimationAdapter) {
AnimatorSet animation = new AnimatorSet();
animation.setDuration(1000);
animation.playTogether(ObjectAnimator.ofFloat(mAppBarLayout, "Y", -getActionBarSize() - (AppCompat.AFTER_LOLLIPOP ? getStatusBarSize() : 0), AppCompat.AFTER_LOLLIPOP ? getStatusBarSize() : 0), ObjectAnimator.ofFloat(mBottomLayout, "Y", mBottomLayout.getTop() + getActionBarSize(), mBottomLayout.getTop()), ObjectAnimator.ofFloat(mStatusCoverView, "Y", -getActionBarSize(), 0f));
animation.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
if (onAnimationAdapter != null) {
onAnimationAdapter.onAnimationStarted(IPhotoDetailPresenter.STATE_SHOW);
}
}
@Override
public void onAnimationEnd(Animator animation) {
if (onAnimationAdapter != null) {
onAnimationAdapter.onAnimationEnded(IPhotoDetailPresenter.STATE_SHOW);
}
}
});
animation.start();
}
use of com.nineoldandroids.animation.Animator in project AisenWeiBo by wangdan.
the class SupportAnimatorPreL method addListener.
@Override
public void addListener(final AnimatorListener listener) {
Animator a = mAnimator.get();
if (a == null) {
return;
}
if (listener == null) {
a.addListener(null);
return;
}
a.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
listener.onAnimationStart();
}
@Override
public void onAnimationEnd(Animator animation) {
listener.onAnimationEnd();
}
@Override
public void onAnimationCancel(Animator animation) {
listener.onAnimationCancel();
}
@Override
public void onAnimationRepeat(Animator animation) {
listener.onAnimationRepeat();
}
});
}
use of com.nineoldandroids.animation.Animator in project AisenWeiBo by wangdan.
the class ArcAnimator method setupStartValues.
@Override
public void setupStartValues() {
super.setupStartValues();
Animator a = mAnimator.get();
if (a != null)
a.setupStartValues();
}
use of com.nineoldandroids.animation.Animator in project AisenWeiBo by wangdan.
the class ArcAnimator method start.
@Override
public void start() {
super.start();
Animator a = mAnimator.get();
if (a != null)
a.start();
}
use of com.nineoldandroids.animation.Animator in project AisenWeiBo by wangdan.
the class ArcAnimator method end.
@Override
public void end() {
super.end();
Animator a = mAnimator.get();
if (a != null)
a.end();
}
Aggregations