MultiSelectView.java 文件源码

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

项目:MultiSelecter 作者:
private void animator(final View itemView, final Filter item, final FloatImgBean floatImg, int startX, int startY, int endX, int endY) {
    ObjectAnimator animatorX = ObjectAnimator.ofFloat(floatImg.mImageView, "translationX", startX - mStartX, endX - mStartX);
    ObjectAnimator animatorY = ObjectAnimator.ofFloat(floatImg.mImageView, "translationY", startY - mStartY, endY - mStartY);
    AnimatorSet animatorSet = new AnimatorSet();
    animatorSet.playTogether(animatorX, animatorY);
    animatorSet.setDuration(calcDuration(startX - endX, startY - endY));
    animatorSet.setInterpolator(new OvershootInterpolator(1.1f));
    animatorSet.start();
    animatorSet.addListener(new AnimatorListenerAdapter() {
        @Override
        public void onAnimationEnd(Animator animation) {
            floatImg.mImageView.setVisibility(View.GONE);
            floatImg.mIsAnimator = false;
            mIconListRvAdapter.add(item);
            mIconRecyclerView.smoothScrollToPosition(mIconListRvAdapter.getItemCount());
            mPlaceHolder.setVisibility(View.GONE);
            refreshLayout(false);
            itemView.setClickable(true);
        }
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号