@Override public void clearView(final RecyclerView recyclerView, final RecyclerView.ViewHolder viewHolder) { super.clearView(recyclerView, viewHolder); viewHolder.itemView.setAlpha(ALPHA_FULL); if (viewHolder instanceof ItemTouchHelperViewHolder) { // Tell the view holder it's time to restore the idle state ItemTouchHelperViewHolder itemViewHolder = (ItemTouchHelperViewHolder) viewHolder; itemViewHolder.onItemClear(); } }
@Override public void clearView(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { super.clearView(recyclerView, viewHolder); if (viewHolder.itemView.getTag(R.id.BaseQuickAdapter_dragging_support) != null && (Boolean) viewHolder.itemView.getTag(R.id.BaseQuickAdapter_dragging_support)) { mAdapter.onItemDragEnd(viewHolder); viewHolder.itemView.setTag(R.id.BaseQuickAdapter_dragging_support, false); } if (viewHolder.itemView.getTag(R.id.BaseQuickAdapter_swiping_support) != null && (Boolean) viewHolder.itemView.getTag(R.id.BaseQuickAdapter_swiping_support)) { mAdapter.onItemSwipeClear(viewHolder); viewHolder.itemView.setTag(R.id.BaseQuickAdapter_swiping_support, false); } }
@Override public void clearView(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { super.clearView(recyclerView, viewHolder); ItemTouchHelperViewHolder itemViewHolder = (ItemTouchHelperViewHolder) viewHolder; itemViewHolder.onItemClear(); }