@Override
 public boolean animateChange(
     RecyclerView.ViewHolder oldHolder,
     RecyclerView.ViewHolder newHolder,
     int fromX,
     int fromY,
     int toX,
     int toY) {
   if (oldHolder == newHolder) {
     // Don't know how to run change animations when the same view holder is re-used.
     // run a move animation to handle position changes.
     return animateMove(oldHolder, fromX, fromY, toX, toY);
   }
   final float prevTranslationX = ViewCompat.getTranslationX(oldHolder.itemView);
   final float prevTranslationY = ViewCompat.getTranslationY(oldHolder.itemView);
   final float prevAlpha = ViewCompat.getAlpha(oldHolder.itemView);
   resetAnimation(oldHolder);
   int deltaX = (int) (toX - fromX - prevTranslationX);
   int deltaY = (int) (toY - fromY - prevTranslationY);
   // recover prev translation state after ending animation
   ViewCompat.setTranslationX(oldHolder.itemView, prevTranslationX);
   ViewCompat.setTranslationY(oldHolder.itemView, prevTranslationY);
   ViewCompat.setAlpha(oldHolder.itemView, prevAlpha);
   if (newHolder != null) {
     // carry over translation values
     resetAnimation(newHolder);
     ViewCompat.setTranslationX(newHolder.itemView, -deltaX);
     ViewCompat.setTranslationY(newHolder.itemView, -deltaY);
     ViewCompat.setAlpha(newHolder.itemView, 0);
   }
   mPendingChanges.add(new ChangeInfo(oldHolder, newHolder, fromX, fromY, toX, toY));
   return true;
 }
  @Override
  public void transformPage(View view, float position) {
    int pageWidth = view.getWidth();

    if (position < -1) { // [-Infinity,-1)
      // This page is way off-screen to the left.
      ViewCompat.setAlpha(view, 0);

    } else if (position <= 0) { // [-1,0]
      // Use the default slide transition when moving to the left page
      ViewCompat.setAlpha(view, 1);
      ViewCompat.setTranslationX(view, 0);
      ViewCompat.setScaleX(view, 1);
      ViewCompat.setScaleY(view, 1);

    } else if (position <= 1) { // (0,1]
      // Fade the page out.
      ViewCompat.setAlpha(view, 1 - position);

      // Counteract the default slide transition
      ViewCompat.setTranslationX(view, pageWidth * -position);

      // Scale the page down (between MIN_SCALE and 1)
      float scaleFactor = MIN_SCALE + (1 - MIN_SCALE) * (1 - Math.abs(position));
      ViewCompat.setScaleX(view, scaleFactor);
      ViewCompat.setScaleY(view, scaleFactor);

    } else { // (1,+Infinity]
      // This page is way off-screen to the right.
      ViewCompat.setAlpha(view, 0);
    }
  }
    @Override
    public void onAnimationEnd(View view) {
      mAnimator.setListener(null);
      // [WORKAROUND]
      // Issue 189686: NPE can be occurred when using the ViewPropertyAnimatorCompat
      // https://code.google.com/p/android/issues/detail?id=189686
      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        InternalHelperKK.clearViewPropertyAnimatorUpdateListener(view);
      } else {
        mAnimator.setUpdateListener(null);
      }

      ViewCompat.setTranslationX(view, mToX);
      ViewCompat.setTranslationY(view, mToY);

      mActive.remove(mViewHolder);

      // [WORKAROUND]
      // issue #152 - bug:Samsung S3 4.1.1(Genymotion) with swipe left
      ViewParent itemParentView = mViewHolder.itemView.getParent();
      if (itemParentView != null) {
        ViewCompat.postInvalidateOnAnimation((View) itemParentView);
      }

      if (mSwipeFinish != null) {
        mSwipeFinish.resultAction.slideAnimationEnd();
      }

      // clean up
      mActive = null;
      mAnimator = null;
      mViewHolder = null;
      mAdapter = null;
    }
 @Override
 protected void onRemoveCanceled(ViewHolder holder) {
   ViewCompat.setRotationY(holder.itemView, 0);
   ViewCompat.setTranslationX(holder.itemView, 0);
   ViewCompat.setScaleX(holder.itemView, 1);
   ViewCompat.setScaleY(holder.itemView, 1);
 }
  private boolean animateSlideInternal(
      RecyclerView.ViewHolder holder,
      boolean horizontal,
      int translationX,
      int translationY,
      long duration,
      Interpolator interpolator,
      SwipeFinishInfo swipeFinish) {
    if (!(holder instanceof SwipeableItemViewHolder)) {
      return false;
    }

    final View containerView = ((SwipeableItemViewHolder) holder).getSwipeableContainerView();

    final int prevTranslationX = (int) (ViewCompat.getTranslationX(containerView) + 0.5f);
    final int prevTranslationY = (int) (ViewCompat.getTranslationY(containerView) + 0.5f);

    endAnimation(holder);

    final int curTranslationX = (int) (ViewCompat.getTranslationX(containerView) + 0.5f);
    final int curTranslationY = (int) (ViewCompat.getTranslationY(containerView) + 0.5f);
    //noinspection UnnecessaryLocalVariable
    final int toX = translationX;
    //noinspection UnnecessaryLocalVariable
    final int toY = translationY;

    if ((duration == 0)
        || (curTranslationX == toX && curTranslationY == toY)
        || (Math.max(Math.abs(toX - prevTranslationX), Math.abs(toY - prevTranslationY))
            <= mImmediatelySetTranslationThreshold)) {
      ViewCompat.setTranslationX(containerView, toX);
      ViewCompat.setTranslationY(containerView, toY);

      return false;
    }

    ViewCompat.setTranslationX(containerView, prevTranslationX);
    ViewCompat.setTranslationY(containerView, prevTranslationY);

    SlidingAnimatorListenerObject listener =
        new SlidingAnimatorListenerObject(
            mAdapter, mActive, holder, toX, toY, duration, horizontal, interpolator, swipeFinish);

    listener.start();

    return true;
  }
  public void invalidateDraggingItem() {
    if (mDraggingItemViewHolder != null) {
      ViewCompat.setTranslationX(mDraggingItemViewHolder.itemView, 0);
      ViewCompat.setTranslationY(mDraggingItemViewHolder.itemView, 0);
      mDraggingItemViewHolder.itemView.setVisibility(View.VISIBLE);
    }

    mDraggingItemViewHolder = null;
  }
 public boolean animateChange(RecyclerView.ViewHolder paramViewHolder1, RecyclerView.ViewHolder paramViewHolder2, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
 {
   float f1 = ViewCompat.getTranslationX(itemView);
   float f2 = ViewCompat.getTranslationY(itemView);
   float f3 = ViewCompat.getAlpha(itemView);
   endAnimation(paramViewHolder1);
   int i = (int)(paramInt3 - paramInt1 - f1);
   int j = (int)(paramInt4 - paramInt2 - f2);
   ViewCompat.setTranslationX(itemView, f1);
   ViewCompat.setTranslationY(itemView, f2);
   ViewCompat.setAlpha(itemView, f3);
   if ((paramViewHolder2 != null) && (itemView != null))
   {
     endAnimation(paramViewHolder2);
     ViewCompat.setTranslationX(itemView, -i);
     ViewCompat.setTranslationY(itemView, -j);
     ViewCompat.setAlpha(itemView, 0.0F);
   }
   mPendingChanges.add(new DefaultItemAnimator.ChangeInfo(paramViewHolder1, paramViewHolder2, paramInt1, paramInt2, paramInt3, paramInt4, null));
   return true;
 }
  private void animateAddImpl(final ViewHolder holder) {
    final View view = holder.itemView;
    final ViewPropertyAnimatorCompat animation = ViewCompat.animate(view);
    mAddAnimations.add(holder);
    float startX, startY;

    int position = (int) view.getTag();

    if (position % 2 == 0) {
      startY = -100;
      startX = -width;
    } else {
      startY = 100;
      startX = width;
    }
    Log.d("test", String.valueOf(holder.getLayoutPosition()));
    ViewCompat.setTranslationX(view, startX);
    // 应该是相对偏移
    ViewCompat.setTranslationY(view, startY);
    ViewCompat.setAlpha(view, 0);
    animation.setInterpolator(new OvershootInterpolator());
    animation
        .alpha(1)
        .translationX(0)
        .translationY(0)
        .setDuration(getAddDuration())
        .setListener(
            new VpaListenerAdapter() {
              @Override
              public void onAnimationStart(View view) {
                dispatchAddStarting(holder);
              }

              @Override
              public void onAnimationCancel(View view) {
                ViewCompat.setAlpha(view, 1);
              }

              @Override
              public void onAnimationEnd(View view) {
                animation.setListener(null);
                dispatchAddFinished(holder);
                mAddAnimations.remove(holder);
                dispatchFinishedWhenDone();
                // 使用这个来复原
                ViewCompat.setTranslationY(view, 0);
              }
            })
        .start();
  }
 @Override
 public boolean animateChange(
     ViewHolder oldHolder, ViewHolder newHolder, int fromX, int fromY, int toX, int toY) {
   final float prevTranslationX = ViewCompat.getTranslationX(oldHolder.itemView);
   final float prevTranslationY = ViewCompat.getTranslationY(oldHolder.itemView);
   final float prevAlpha = ViewCompat.getAlpha(oldHolder.itemView);
   endAnimation(oldHolder);
   int deltaX = (int) (toX - fromX - prevTranslationX);
   int deltaY = (int) (toY - fromY - prevTranslationY);
   // recover prev translation state after ending animation
   ViewCompat.setTranslationX(oldHolder.itemView, prevTranslationX);
   ViewCompat.setTranslationY(oldHolder.itemView, prevTranslationY);
   ViewCompat.setAlpha(oldHolder.itemView, prevAlpha);
   if (newHolder != null && newHolder.itemView != null) {
     // carry over translation values
     endAnimation(newHolder);
     ViewCompat.setTranslationX(newHolder.itemView, -deltaX);
     ViewCompat.setTranslationY(newHolder.itemView, -deltaY);
     ViewCompat.setAlpha(newHolder.itemView, 0);
   }
   mPendingChanges.add(new ChangeInfo(oldHolder, newHolder, fromX, fromY, toX, toY));
   return true;
 }
  private static void slideInternal(
      final RecyclerView.ViewHolder holder,
      boolean horizontal,
      int translationX,
      int translationY) {
    if (!(holder instanceof SwipeableItemViewHolder)) {
      return;
    }

    final View containerView = ((SwipeableItemViewHolder) holder).getSwipeableContainerView();
    ViewCompat.animate(containerView).cancel();
    ViewCompat.setTranslationX(containerView, translationX);
    ViewCompat.setTranslationY(containerView, translationY);
  }
 private boolean endChangeAnimationIfNecessary(ChangeInfo changeInfo, ViewHolder item) {
   boolean oldItem = false;
   if (changeInfo.newHolder == item) {
     changeInfo.newHolder = null;
   } else if (changeInfo.oldHolder == item) {
     changeInfo.oldHolder = null;
     oldItem = true;
   } else {
     return false;
   }
   ViewCompat.setAlpha(item.itemView, 1);
   ViewCompat.setTranslationX(item.itemView, 0);
   ViewCompat.setTranslationY(item.itemView, 0);
   dispatchChangeFinished(item, oldItem);
   return true;
 }
 @Override
 public boolean animateMove(final ViewHolder holder, int fromX, int fromY, int toX, int toY) {
   final View view = holder.itemView;
   fromX += ViewCompat.getTranslationX(holder.itemView);
   fromY += ViewCompat.getTranslationY(holder.itemView);
   endAnimation(holder);
   int deltaX = toX - fromX;
   int deltaY = toY - fromY;
   if (deltaX == 0 && deltaY == 0) {
     dispatchMoveFinished(holder);
     return false;
   }
   if (deltaX != 0) {
     ViewCompat.setTranslationX(view, -deltaX);
   }
   if (deltaY != 0) {
     ViewCompat.setTranslationY(view, -deltaY);
   }
   mPendingMoves.add(new MoveInfo(holder, fromX, fromY, toX, toY));
   return true;
 }
 public boolean animateMove(RecyclerView.ViewHolder paramViewHolder, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
 {
   View localView = itemView;
   paramInt1 = (int)(paramInt1 + ViewCompat.getTranslationX(itemView));
   paramInt2 = (int)(paramInt2 + ViewCompat.getTranslationY(itemView));
   endAnimation(paramViewHolder);
   int i = paramInt3 - paramInt1;
   int j = paramInt4 - paramInt2;
   if ((i == 0) && (j == 0))
   {
     dispatchMoveFinished(paramViewHolder);
     return false;
   }
   if (i != 0) {
     ViewCompat.setTranslationX(localView, -i);
   }
   if (j != 0) {
     ViewCompat.setTranslationY(localView, -j);
   }
   mPendingMoves.add(new DefaultItemAnimator.MoveInfo(paramViewHolder, paramInt1, paramInt2, paramInt3, paramInt4, null));
   return true;
 }
 private boolean endChangeAnimationIfNecessary(DefaultItemAnimator.ChangeInfo paramChangeInfo, RecyclerView.ViewHolder paramViewHolder)
 {
   boolean bool2 = false;
   boolean bool1 = false;
   if (newHolder == paramViewHolder) {
     newHolder = null;
   }
   for (;;)
   {
     ViewCompat.setAlpha(itemView, 1.0F);
     ViewCompat.setTranslationX(itemView, 0.0F);
     ViewCompat.setTranslationY(itemView, 0.0F);
     dispatchChangeFinished(paramViewHolder, bool1);
     bool1 = true;
     do
     {
       return bool1;
       bool1 = bool2;
     } while (oldHolder != paramViewHolder);
     oldHolder = null;
     bool1 = true;
   }
 }
  @Override
  public void endAnimations() {
    int count = mPendingMoves.size();
    for (int i = count - 1; i >= 0; i--) {
      MoveInfo item = mPendingMoves.get(i);
      View view = item.holder.itemView;
      ViewCompat.setTranslationY(view, 0);
      ViewCompat.setTranslationX(view, 0);
      dispatchMoveFinished(item.holder);
      mPendingMoves.remove(i);
    }
    count = mPendingRemovals.size();
    for (int i = count - 1; i >= 0; i--) {
      ViewHolder item = mPendingRemovals.get(i);
      dispatchRemoveFinished(item);
      mPendingRemovals.remove(i);
    }
    count = mPendingAdditions.size();
    for (int i = count - 1; i >= 0; i--) {
      ViewHolder item = mPendingAdditions.get(i);
      View view = item.itemView;
      ViewCompat.setAlpha(view, 1);
      dispatchAddFinished(item);
      mPendingAdditions.remove(i);
    }
    count = mPendingChanges.size();
    for (int i = count - 1; i >= 0; i--) {
      endChangeAnimationIfNecessary(mPendingChanges.get(i));
    }
    mPendingChanges.clear();
    if (!isRunning()) {
      return;
    }

    int listCount = mMovesList.size();
    for (int i = listCount - 1; i >= 0; i--) {
      ArrayList<MoveInfo> moves = mMovesList.get(i);
      count = moves.size();
      for (int j = count - 1; j >= 0; j--) {
        MoveInfo moveInfo = moves.get(j);
        ViewHolder item = moveInfo.holder;
        View view = item.itemView;
        ViewCompat.setTranslationY(view, 0);
        ViewCompat.setTranslationX(view, 0);
        dispatchMoveFinished(moveInfo.holder);
        moves.remove(j);
        if (moves.isEmpty()) {
          mMovesList.remove(moves);
        }
      }
    }
    listCount = mAdditionsList.size();
    for (int i = listCount - 1; i >= 0; i--) {
      ArrayList<ViewHolder> additions = mAdditionsList.get(i);
      count = additions.size();
      for (int j = count - 1; j >= 0; j--) {
        ViewHolder item = additions.get(j);
        View view = item.itemView;
        ViewCompat.setAlpha(view, 1);
        dispatchAddFinished(item);
        additions.remove(j);
        if (additions.isEmpty()) {
          mAdditionsList.remove(additions);
        }
      }
    }
    listCount = mChangesList.size();
    for (int i = listCount - 1; i >= 0; i--) {
      ArrayList<ChangeInfo> changes = mChangesList.get(i);
      count = changes.size();
      for (int j = count - 1; j >= 0; j--) {
        endChangeAnimationIfNecessary(changes.get(j));
        if (changes.isEmpty()) {
          mChangesList.remove(changes);
        }
      }
    }

    cancelAll(mRemoveAnimations);
    cancelAll(mMoveAnimations);
    cancelAll(mAddAnimations);
    cancelAll(mChangeAnimations);

    dispatchAnimationsFinished();
  }
 @Override
 public void addAnimationPrepare(View view) {
   ViewCompat.setTranslationX(view, -view.getWidth());
   ViewCompat.setAlpha(view, 0);
 }
 public void endAnimations()
 {
   int i = mPendingMoves.size() - 1;
   Object localObject1;
   Object localObject2;
   while (i >= 0)
   {
     localObject1 = (DefaultItemAnimator.MoveInfo)mPendingMoves.get(i);
     localObject2 = holder.itemView;
     ViewCompat.setTranslationY((View)localObject2, 0.0F);
     ViewCompat.setTranslationX((View)localObject2, 0.0F);
     dispatchMoveFinished(holder);
     mPendingMoves.remove(i);
     i -= 1;
   }
   i = mPendingRemovals.size() - 1;
   while (i >= 0)
   {
     dispatchRemoveFinished((RecyclerView.ViewHolder)mPendingRemovals.get(i));
     mPendingRemovals.remove(i);
     i -= 1;
   }
   i = mPendingAdditions.size() - 1;
   while (i >= 0)
   {
     localObject1 = (RecyclerView.ViewHolder)mPendingAdditions.get(i);
     ViewCompat.setAlpha(itemView, 1.0F);
     dispatchAddFinished((RecyclerView.ViewHolder)localObject1);
     mPendingAdditions.remove(i);
     i -= 1;
   }
   i = mPendingChanges.size() - 1;
   while (i >= 0)
   {
     endChangeAnimationIfNecessary((DefaultItemAnimator.ChangeInfo)mPendingChanges.get(i));
     i -= 1;
   }
   mPendingChanges.clear();
   if (!isRunning()) {
     return;
   }
   i = mMovesList.size() - 1;
   int j;
   while (i >= 0)
   {
     localObject1 = (ArrayList)mMovesList.get(i);
     j = ((ArrayList)localObject1).size() - 1;
     while (j >= 0)
     {
       localObject2 = (DefaultItemAnimator.MoveInfo)((ArrayList)localObject1).get(j);
       View localView = holder.itemView;
       ViewCompat.setTranslationY(localView, 0.0F);
       ViewCompat.setTranslationX(localView, 0.0F);
       dispatchMoveFinished(holder);
       ((ArrayList)localObject1).remove(j);
       if (((ArrayList)localObject1).isEmpty()) {
         mMovesList.remove(localObject1);
       }
       j -= 1;
     }
     i -= 1;
   }
   i = mAdditionsList.size() - 1;
   while (i >= 0)
   {
     localObject1 = (ArrayList)mAdditionsList.get(i);
     j = ((ArrayList)localObject1).size() - 1;
     while (j >= 0)
     {
       localObject2 = (RecyclerView.ViewHolder)((ArrayList)localObject1).get(j);
       ViewCompat.setAlpha(itemView, 1.0F);
       dispatchAddFinished((RecyclerView.ViewHolder)localObject2);
       ((ArrayList)localObject1).remove(j);
       if (((ArrayList)localObject1).isEmpty()) {
         mAdditionsList.remove(localObject1);
       }
       j -= 1;
     }
     i -= 1;
   }
   i = mChangesList.size() - 1;
   while (i >= 0)
   {
     localObject1 = (ArrayList)mChangesList.get(i);
     j = ((ArrayList)localObject1).size() - 1;
     while (j >= 0)
     {
       endChangeAnimationIfNecessary((DefaultItemAnimator.ChangeInfo)((ArrayList)localObject1).get(j));
       if (((ArrayList)localObject1).isEmpty()) {
         mChangesList.remove(localObject1);
       }
       j -= 1;
     }
     i -= 1;
   }
   cancelAll(mRemoveAnimations);
   cancelAll(mMoveAnimations);
   cancelAll(mAddAnimations);
   cancelAll(mChangeAnimations);
   dispatchAnimationsFinished();
 }
  @Override
  public void endAnimation(ViewHolder item) {
    final View view = item.itemView;
    // this will trigger end callback which should set properties to their
    // target values.
    ViewCompat.animate(view).cancel();
    // TODO if some other animations are chained to end, how do we cancel
    // them as well?
    for (int i = mPendingMoves.size() - 1; i >= 0; i--) {
      MoveInfo moveInfo = mPendingMoves.get(i);
      if (moveInfo.holder == item) {
        ViewCompat.setTranslationY(view, 0);
        ViewCompat.setTranslationX(view, 0);
        dispatchMoveFinished(item);
        mPendingMoves.remove(item);
      }
    }
    endChangeAnimation(mPendingChanges, item);
    if (mPendingRemovals.remove(item)) {
      ViewCompat.setAlpha(view, 1);
      dispatchRemoveFinished(item);
    }
    if (mPendingAdditions.remove(item)) {
      ViewCompat.setAlpha(view, 1);
      dispatchAddFinished(item);
    }

    for (int i = mChangesList.size() - 1; i >= 0; i--) {
      ArrayList<ChangeInfo> changes = mChangesList.get(i);
      endChangeAnimation(changes, item);
      if (changes.isEmpty()) {
        mChangesList.remove(changes);
      }
    }
    for (int i = mMovesList.size() - 1; i >= 0; i--) {
      ArrayList<MoveInfo> moves = mMovesList.get(i);
      for (int j = moves.size() - 1; j >= 0; j--) {
        MoveInfo moveInfo = moves.get(j);
        if (moveInfo.holder == item) {
          ViewCompat.setTranslationY(view, 0);
          ViewCompat.setTranslationX(view, 0);
          dispatchMoveFinished(item);
          moves.remove(j);
          if (moves.isEmpty()) {
            mMovesList.remove(moves);
          }
          break;
        }
      }
    }
    for (int i = mAdditionsList.size() - 1; i >= 0; i--) {
      ArrayList<ViewHolder> additions = mAdditionsList.get(i);
      if (additions.remove(item)) {
        ViewCompat.setAlpha(view, 1);
        dispatchAddFinished(item);
        if (additions.isEmpty()) {
          mAdditionsList.remove(additions);
        }
      }
    }

    // animations should be ended by the cancel above.
    if (mRemoveAnimations.remove(item) && DEBUG) {
      throw new IllegalStateException(
          "after animation is cancelled, item should not be in " + "mRemoveAnimations list");
    }

    if (mAddAnimations.remove(item) && DEBUG) {
      throw new IllegalStateException(
          "after animation is cancelled, item should not be in " + "mAddAnimations list");
    }

    if (mChangeAnimations.remove(item) && DEBUG) {
      throw new IllegalStateException(
          "after animation is cancelled, item should not be in " + "mChangeAnimations list");
    }

    if (mMoveAnimations.remove(item) && DEBUG) {
      throw new IllegalStateException(
          "after animation is cancelled, item should not be in " + "mMoveAnimations list");
    }
    dispatchFinishedWhenDone();
  }
 @Override
 public void removeAnimationCleanup(View view) {
   ViewCompat.setTranslationX(view, 0);
   ViewCompat.setAlpha(view, 1);
 }
 @Override
 protected void prepareAnimateAdd(RecyclerView.ViewHolder holder) {
   ViewCompat.setTranslationX(holder.itemView, -mRecyclerView.getWidth());
 }
 @Override
 protected boolean prepHolderForAnimateAdd(ViewHolder holder) {
   ViewCompat.setTranslationX(holder.itemView, -(holder.itemView.getMeasuredWidth() / 2));
   ViewCompat.setRotationY(holder.itemView, -90);
   return true;
 }
 @Override
 protected void onAddCanceled(ViewHolder holder) {
   ViewCompat.setRotationY(holder.itemView, 0);
   ViewCompat.setTranslationX(holder.itemView, 0);
 }
 public void clearView(View view)
 {
     ViewCompat.setTranslationX(view, 0.0F);
     ViewCompat.setTranslationY(view, 0.0F);
 }
 public void endAnimation(RecyclerView.ViewHolder paramViewHolder)
 {
   View localView = itemView;
   ViewCompat.animate(localView).cancel();
   int i = mPendingMoves.size() - 1;
   while (i >= 0)
   {
     if (mPendingMoves.get(i)).holder == paramViewHolder)
     {
       ViewCompat.setTranslationY(localView, 0.0F);
       ViewCompat.setTranslationX(localView, 0.0F);
       dispatchMoveFinished(paramViewHolder);
       mPendingMoves.remove(i);
     }
     i -= 1;
   }
   endChangeAnimation(mPendingChanges, paramViewHolder);
   if (mPendingRemovals.remove(paramViewHolder))
   {
     ViewCompat.setAlpha(localView, 1.0F);
     dispatchRemoveFinished(paramViewHolder);
   }
   if (mPendingAdditions.remove(paramViewHolder))
   {
     ViewCompat.setAlpha(localView, 1.0F);
     dispatchAddFinished(paramViewHolder);
   }
   i = mChangesList.size() - 1;
   ArrayList localArrayList;
   while (i >= 0)
   {
     localArrayList = (ArrayList)mChangesList.get(i);
     endChangeAnimation(localArrayList, paramViewHolder);
     if (localArrayList.isEmpty()) {
       mChangesList.remove(i);
     }
     i -= 1;
   }
   i = mMovesList.size() - 1;
   if (i >= 0)
   {
     localArrayList = (ArrayList)mMovesList.get(i);
     int j = localArrayList.size() - 1;
     for (;;)
     {
       if (j >= 0)
       {
         if (getholder != paramViewHolder) {
           break label293;
         }
         ViewCompat.setTranslationY(localView, 0.0F);
         ViewCompat.setTranslationX(localView, 0.0F);
         dispatchMoveFinished(paramViewHolder);
         localArrayList.remove(j);
         if (localArrayList.isEmpty()) {
           mMovesList.remove(i);
         }
       }
       i -= 1;
       break;
       label293:
       j -= 1;
     }
   }
   i = mAdditionsList.size() - 1;
   while (i >= 0)
   {
     localArrayList = (ArrayList)mAdditionsList.get(i);
     if (localArrayList.remove(paramViewHolder))
     {
       ViewCompat.setAlpha(localView, 1.0F);
       dispatchAddFinished(paramViewHolder);
       if (localArrayList.isEmpty()) {
         mAdditionsList.remove(i);
       }
     }
     i -= 1;
   }
   mRemoveAnimations.remove(paramViewHolder);
   mAddAnimations.remove(paramViewHolder);
   mChangeAnimations.remove(paramViewHolder);
   mMoveAnimations.remove(paramViewHolder);
   dispatchFinishedWhenDone();
 }
 public void onDraw(Canvas canvas, RecyclerView recyclerview, View view, float f, float f1, int i, boolean flag)
 {
     ViewCompat.setTranslationX(view, f);
     ViewCompat.setTranslationY(view, f1);
 }