@Test public void reUseWithPayload() { RecyclerView.ViewHolder vh = new ViewHolder(new TextView(getActivity())); assertFalse(mAnimator.canReuseUpdatedViewHolder(vh, new ArrayList<>())); assertTrue(mAnimator.canReuseUpdatedViewHolder(vh, Arrays.asList((Object) "a"))); }
@Override public boolean canReuseUpdatedViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, @NonNull List<Object> payloads) { return !payloads.isEmpty() || super.canReuseUpdatedViewHolder(viewHolder, payloads); }
DefaultItemAnimator extends SimpleItemAnimator { @Override public boolean canReuseUpdatedViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, @NonNull List<Object> payloads) { return !payloads.isEmpty() || super.canReuseUpdatedViewHolder(viewHolder, payloads); } }
DefaultItemAnimator extends SimpleItemAnimator { @Override public boolean canReuseUpdatedViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, @NonNull List<Object> payloads) { return !payloads.isEmpty() || super.canReuseUpdatedViewHolder(viewHolder, payloads); }  }
DefaultItemAnimator extends SimpleItemAnimator { @Override public boolean canReuseUpdatedViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, @NonNull List<Object> payloads) { return !payloads.isEmpty() || super.canReuseUpdatedViewHolder(viewHolder, payloads); }  @Override void runPendingAnimations(); @Override boolean animateRemove(final RecyclerView.ViewHolder holder); @Override boolean animateAdd(final RecyclerView.ViewHolder holder); @Override boolean animateMove(final RecyclerView.ViewHolder holder, int fromX, int fromY,
            int toX, int toY); @Override boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder,
            int fromX, int fromY, int toX, int toY); @Override void endAnimation(RecyclerView.ViewHolder item); @Override boolean isRunning(); @Override void endAnimations(); @Override boolean canReuseUpdatedViewHolder(@NonNull RecyclerView.ViewHolder viewHolder,
            @NonNull List<Object> payloads); }
DefaultItemAnimator extends SimpleItemAnimator { @Override public boolean canReuseUpdatedViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, @NonNull List<Object> payloads) { return !payloads.isEmpty() || super.canReuseUpdatedViewHolder(viewHolder, payloads); }  @Override void runPendingAnimations(); @Override boolean animateRemove(final RecyclerView.ViewHolder holder); @Override boolean animateAdd(final RecyclerView.ViewHolder holder); @Override boolean animateMove(final RecyclerView.ViewHolder holder, int fromX, int fromY,
            int toX, int toY); @Override boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder,
            int fromX, int fromY, int toX, int toY); @Override void endAnimation(RecyclerView.ViewHolder item); @Override boolean isRunning(); @Override void endAnimations(); @Override boolean canReuseUpdatedViewHolder(@NonNull RecyclerView.ViewHolder viewHolder,
            @NonNull List<Object> payloads);  }