/** * Called when a view created by this adapter has been attached to a window. * simple to solve item will layout using all * {@link #setFullSpan(RecyclerView.ViewHolder)} * * @param holder */ @Override public void onViewAttachedToWindow(K holder) { super.onViewAttachedToWindow(holder); int type = holder.getItemViewType(); if (type == EMPTY_VIEW || type == HEADER_VIEW || type == FOOTER_VIEW || type == LOADING_VIEW) { setFullSpan(holder); } else { addAnimation(holder); } }