mirror of https://github.com/M66B/FairEmail.git
Fixed original view scrolling issues
This commit is contained in:
parent
dbd88712b7
commit
65caca4bab
|
@ -316,18 +316,20 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
|||
intercept = (yoff > 0 || dy >= 0) && (yoff < bottom || dy <= 0);
|
||||
}
|
||||
|
||||
int xrange = computeHorizontalScrollRange();
|
||||
int xextend = computeHorizontalScrollExtent();
|
||||
boolean canScrollHorizontal = (xrange > xextend);
|
||||
if (canScrollHorizontal) {
|
||||
int right = xrange - xextend;
|
||||
int xoff = computeHorizontalScrollOffset();
|
||||
int ldx = xoff - lastXoff;
|
||||
float dx = lastX - event.getX();
|
||||
intercept = (xoff > 0 || dx >= 0) &&
|
||||
(xoff < right || dx <= 0) &&
|
||||
(Math.signum(dx) == Math.signum(ldx));
|
||||
lastXoff = xoff;
|
||||
if (!intercept) {
|
||||
int xrange = computeHorizontalScrollRange();
|
||||
int xextend = computeHorizontalScrollExtent();
|
||||
boolean canScrollHorizontal = (xrange > xextend);
|
||||
if (canScrollHorizontal) {
|
||||
int right = xrange - xextend;
|
||||
int xoff = computeHorizontalScrollOffset();
|
||||
int ldx = xoff - lastXoff;
|
||||
float dx = lastX - event.getX();
|
||||
intercept = (xoff > 0 || dx >= 0) &&
|
||||
(xoff < right || dx <= 0) &&
|
||||
(Math.signum(dx) == Math.signum(ldx));
|
||||
lastXoff = xoff;
|
||||
}
|
||||
}
|
||||
}
|
||||
getParent().requestDisallowInterceptTouchEvent(intercept || event.getPointerCount() > 1);
|
||||
|
|
Loading…
Reference in New Issue