Use correct position for item decorator
It should use binding adapter to react to changes in binding order (moving) properly. Test: manual Fixes: 184610254 Change-Id: I785f1746cdee4f03315d37b6b1f3335522e0eb17
This commit is contained in:
@@ -728,7 +728,7 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta
|
||||
GridLayoutManager lm = ((GridLayoutManager) parent.getLayoutManager());
|
||||
SpanSizeLookup span = lm.getSpanSizeLookup();
|
||||
ViewHolder holder = parent.getChildViewHolder(view);
|
||||
int column = span.getSpanIndex(holder.getLayoutPosition(), lm.getSpanCount());
|
||||
int column = span.getSpanIndex(holder.getBindingAdapterPosition(), lm.getSpanCount());
|
||||
|
||||
if (view instanceof TextView) {
|
||||
super.getItemOffsets(outRect, view, parent, state);
|
||||
|
||||
Reference in New Issue
Block a user