Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4f9be475cc
1 changed files with 6 additions and 1 deletions
|
@ -88,7 +88,12 @@ public class MapMarkersItemTouchHelperCallback extends ItemTouchHelper.Callback
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder source, RecyclerView.ViewHolder target) {
|
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder source, RecyclerView.ViewHolder target) {
|
||||||
return adapter.onItemMove(source.getAdapterPosition(), target.getAdapterPosition());
|
int from = source.getAdapterPosition();
|
||||||
|
int to = target.getAdapterPosition();
|
||||||
|
if (from == RecyclerView.NO_POSITION || to == RecyclerView.NO_POSITION) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return adapter.onItemMove(from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue