SignUpFragment.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:LoginConcept 作者:
@Override
public void fireAnimation() {
    float offsetX=parent.getWidth()-(parent.getWidth()-first.getLeft()+getResources().getDimension(R.dimen.option_size));
    ObjectAnimator firstAnimator=ObjectAnimator.ofFloat(first,View.TRANSLATION_X,0);
    ObjectAnimator secondAnimator=ObjectAnimator.ofFloat(second,View.TRANSLATION_X,0);
    ObjectAnimator lastAnimator=ObjectAnimator.ofFloat(last,View.TRANSLATION_X,0);
    ObjectAnimator buttonAnimator=ObjectAnimator.ofFloat(controller,View.TRANSLATION_X,controller.getTranslationX());

    first.setTranslationX(-offsetX);
    second.setTranslationX(-offsetX);
    last.setTranslationX(-offsetX);
    controller.setTranslationX(-controller.getWidth());

    buttonAnimator.setInterpolator(new BounceOvershootInterpolator(4));
    AnimatorSet buttonSet=new AnimatorSet();
    buttonSet.playTogether(firstAnimator,secondAnimator,lastAnimator);
    buttonSet.setInterpolator(new BounceOvershootInterpolator(2));

    AnimatorSet animatorSet=new AnimatorSet();
    animatorSet.setStartDelay(500);
    animatorSet.playTogether(buttonSet,buttonAnimator);
    animatorSet.start();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号