diff --git a/library/src/main/java/com/daimajia/swipe/SwipeLayout.java b/library/src/main/java/com/daimajia/swipe/SwipeLayout.java index 6703123c..033dff2c 100644 --- a/library/src/main/java/com/daimajia/swipe/SwipeLayout.java +++ b/library/src/main/java/com/daimajia/swipe/SwipeLayout.java @@ -401,15 +401,21 @@ else if (mCurrentDragEdge == DragEdge.Bottom && newTop > getPaddingTop()) /** * save children's bounds, so they can restore the bound in {@link #onLayout(boolean, int, int, int, int)} + * fix bug: issue,no save close value + * */ private void captureChildrenBound() { View currentBottomView = getCurrentBottomView(); - if (getOpenStatus() == Status.Close) { + + + View[] views; + if(getOpenStatus()==Status.Close){ mViewBoundCache.remove(currentBottomView); - return; + views = new View[]{getSurfaceView()}; + }else{ + views = new View[]{getSurfaceView(), currentBottomView}; } - View[] views = new View[]{getSurfaceView(), currentBottomView}; for (View child : views) { Rect rect = mViewBoundCache.get(child); if (rect == null) {