From 7e97cebcff3d890c93b3d1f96e9496a91bcd34c6 Mon Sep 17 00:00:00 2001 From: LordEinner Date: Thu, 4 Dec 2014 11:21:17 +0100 Subject: [PATCH] Fixed bug showing when dragging list elements with different height https://github.com/nhaarman/ListViewAnimations/issues/307 --- .../itemmanipulation/dragdrop/DragAndDropHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/dragdrop/DragAndDropHandler.java b/lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/dragdrop/DragAndDropHandler.java index 26c231ba..45561667 100644 --- a/lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/dragdrop/DragAndDropHandler.java +++ b/lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/dragdrop/DragAndDropHandler.java @@ -404,7 +404,7 @@ private void switchIfNecessary() { View switchView = getViewForId(switchId); final int deltaY = mHoverDrawable.getDeltaY(); - if (switchView != null && Math.abs(deltaY) > mHoverDrawable.getIntrinsicHeight()) { + if (switchView != null && Math.abs(deltaY) > switchView.getHeight()) { switchViews(switchView, switchId, mHoverDrawable.getIntrinsicHeight() * (deltaY < 0 ? -1 : 1)); }