fix(scroll-view): android 'isScrollEnabled' will apply if changed while gesture is underway (#8695)

This commit is contained in:
DimitrisRK
2020-07-07 05:05:40 +03:00
committed by GitHub
parent 635f31f81f
commit 02ec7f104d
5 changed files with 35 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ public class HorizontalScrollView extends android.widget.HorizontalScrollView {
@Override
public boolean onTouchEvent(MotionEvent ev) {
if (!this.scrollEnabled && ev.getAction() == MotionEvent.ACTION_DOWN) {
if (!this.scrollEnabled && (ev.getAction() == MotionEvent.ACTION_DOWN || ev.getAction() == MotionEvent.ACTION_MOVE)) {
return false;
}

View File

@@ -70,7 +70,7 @@ public class VerticalScrollView extends ScrollView {
@Override
public boolean onTouchEvent(MotionEvent ev) {
if (!this.scrollEnabled && ev.getAction() == MotionEvent.ACTION_DOWN) {
if (!this.scrollEnabled && (ev.getAction() == MotionEvent.ACTION_DOWN || ev.getAction() == MotionEvent.ACTION_MOVE)) {
return false;
}