File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
library/src/main/java/com/daimajia/swipe Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1569,10 +1569,14 @@ private void setCurrentDragEdge(DragEdge dragEdge) {
15691569 private void updateBottomViews () {
15701570 View currentBottomView = getCurrentBottomView ();
15711571 if (currentBottomView != null ) {
1572+ int pixelOffset = dp2px (getCurrentOffset ());
15721573 if (mCurrentDragEdge == DragEdge .Left || mCurrentDragEdge == DragEdge .Right ) {
1573- mDragDistance = currentBottomView .getMeasuredWidth () - dp2px ( getCurrentOffset ()) ;
1574+ mDragDistance = currentBottomView .getMeasuredWidth () - pixelOffset ;
15741575 } else {
1575- mDragDistance = currentBottomView .getMeasuredHeight () - dp2px (getCurrentOffset ());
1576+ mDragDistance = currentBottomView .getMeasuredHeight () - pixelOffset ;
1577+ }
1578+ if (mDragDistance < 0 ) {
1579+ mDragDistance = 0 ;
15761580 }
15771581 }
15781582
You can’t perform that action at this time.
0 commit comments