SkittleLayout.java 文件源码

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

项目:binea_project_for_android 作者:
private void toggleSkittles(View child, int index) {

        int duration = 200;
        FastOutLinearInInterpolator interpolator = new FastOutLinearInInterpolator();

        ObjectAnimator animator = ObjectAnimator.ofPropertyValuesHolder(child,
                PropertyValuesHolder.ofFloat("Y", child.getY() + child.getMeasuredHeight() / 2,
                        child.getY()), PropertyValuesHolder.ofFloat("alpha", 0, 1))
                .setDuration(duration);
        animator.setInterpolator(interpolator);

        if (flag == 0) {
            animator.setStartDelay((skittleContainer.getChildCount() - index) * 15);
            Log.d("Skittle Layout", "Animation");
            animator.start();
        } else {
            animator.setStartDelay(index * 15);
            animator.addListener(this);
            animator.reverse();
        }
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号