From 01b8b5bf2d5ba768a1a81ae50526a0c9f12faafe Mon Sep 17 00:00:00 2001 From: Aaron He Date: Tue, 15 Mar 2016 16:39:46 -0700 Subject: [PATCH] Rename `onViewRemoved` to `onChildViewRemoved` to avoid naming conflict in SDK 23 * In SDK 23, `ViewGroup` added a new method called [`onViewRemoved`](http://developer.android.com/reference/android/view/ViewGroup.html#onViewRemoved(android.view.View)) which conflicts with `SwipeLayout#onViewRemoved`. * Also removed extra `);` on Line 1327 in `SwipeLayout`. --- library/src/main/java/com/daimajia/swipe/SwipeLayout.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/main/java/com/daimajia/swipe/SwipeLayout.java b/library/src/main/java/com/daimajia/swipe/SwipeLayout.java index 578e770f..3eeb4e2d 100644 --- a/library/src/main/java/com/daimajia/swipe/SwipeLayout.java +++ b/library/src/main/java/com/daimajia/swipe/SwipeLayout.java @@ -1324,7 +1324,7 @@ protected void processHandRelease(float xvel, float yvel, boolean isCloseBeforeD if (currentDragEdge == null || surfaceView == null) { return; } - float willOpenPercent = (isCloseBeforeDragged ? mWillOpenPercentAfterClose : mWillOpenPercentAfterOpen);); + float willOpenPercent = (isCloseBeforeDragged ? mWillOpenPercentAfterClose : mWillOpenPercentAfterOpen); if (currentDragEdge == DragEdge.Left) { if (xvel > minVelocity) open(); else if (xvel < -minVelocity) close(); @@ -1563,7 +1563,7 @@ public void setDragEdge(DragEdge dragEdge) { setCurrentDragEdge(dragEdge); } - protected void onViewRemoved(View child) { + protected void onChildViewRemoved(View child) { for (Map.Entry entry : new HashMap(mDragEdges).entrySet()) { if (entry.getValue() == child) { mDragEdges.remove(entry.getKey());