Set initial fake offset to Integer.MAX_VALUE

This fixes issues with out-of-screen-swipes
This commit is contained in:
Adrian Ulrich 2016-03-27 18:31:19 +02:00
parent 6824ee229b
commit e96643b9a6

View File

@ -270,7 +270,8 @@ public class SlidingView extends FrameLayout
int nstages = mStages.size();
int tstage = 0;
int tbonus = (int)mProgressPx * mFlingDirection; // we add the progress as virtual bonus on fling
int toff = (int)mMaxOffsetY;
int toff = Integer.MAX_VALUE;
for (int i=0; i<nstages; i++) {
int tdiff = Math.abs((int)vy + tbonus - mStages.get(i));
if (tdiff < toff) {