File tree 1 file changed +6
-2
lines changed
library/src/main/java/com/daimajia/swipe
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) {
1569
1569
private void updateBottomViews () {
1570
1570
View currentBottomView = getCurrentBottomView ();
1571
1571
if (currentBottomView != null ) {
1572
+ int pixelOffset = dp2px (getCurrentOffset ());
1572
1573
if (mCurrentDragEdge == DragEdge .Left || mCurrentDragEdge == DragEdge .Right ) {
1573
- mDragDistance = currentBottomView .getMeasuredWidth () - dp2px ( getCurrentOffset ()) ;
1574
+ mDragDistance = currentBottomView .getMeasuredWidth () - pixelOffset ;
1574
1575
} else {
1575
- mDragDistance = currentBottomView .getMeasuredHeight () - dp2px (getCurrentOffset ());
1576
+ mDragDistance = currentBottomView .getMeasuredHeight () - pixelOffset ;
1577
+ }
1578
+ if (mDragDistance < 0 ) {
1579
+ mDragDistance = 0 ;
1576
1580
}
1577
1581
}
1578
1582
You can’t perform that action at this time.
0 commit comments