RepeatingChainedAnimationsDemoFragment.java 文件源码

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

项目:android_additive_animations 作者:
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    rootView = (ViewGroup) inflater.inflate(R.layout.fragment_tap_to_move_demo, container, false);
    animatedView = rootView.findViewById(R.id.animated_view);

    rootView.setOnTouchListener(new View.OnTouchListener() {
        @Override
        public boolean onTouch(View v, MotionEvent event) {
            if(event.getAction() == MotionEvent.ACTION_DOWN) {
                AdditiveAnimator.cancelAnimation(animatedView, View.ROTATION);
            }
            return true;
        }
    });

    animate();
    return rootView;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号