enable onTouchEvent for ViewGroups and add some stubs

This commit is contained in:
Julian Winkler
2023-10-30 22:35:31 +01:00
parent 065fd96308
commit 3de842b1d8
9 changed files with 24 additions and 2 deletions

View File

@@ -1991,7 +1991,7 @@ public final class MotionEvent extends InputEvent {
* that pointer identifier.
*/
public final int findPointerIndex(int pointerId) {
return nativeFindPointerIndex(mNativePtr, pointerId);
return 0 /*nativeFindPointerIndex(mNativePtr, pointerId)*/;
}
/**

View File

@@ -9,4 +9,11 @@ public class VelocityTracker {
public void addMovement(MotionEvent event) {}
public void recycle() {}
public void computeCurrentVelocity(int units, float maxVelocity) {}
public float getXVelocity(int id) {return 0.f;}
public float getYVelocity(int id) {return 0.f;}
public void clear() {}
}

View File

@@ -1520,4 +1520,6 @@ public class View extends Object {
}
public void setLayerType(int layerType, Paint paint) {}
public float getZ() {return 0.f;}
}

View File

@@ -302,6 +302,13 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
}
}
protected boolean isChildrenDrawingOrderEnabled() { return false; }
@Override
public boolean onStartNestedScroll(View child, View target, int nestedScrollAxes) {
return false;
}
public static class LayoutParams {
public static final int FILL_PARENT = -1;
public static final int MATCH_PARENT = -1;

View File

@@ -6,4 +6,6 @@ public interface ViewParent {
public boolean isLayoutRequested();
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept);
public abstract boolean onStartNestedScroll(View child, View target, int nestedScrollAxes);
}