You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
implement View.onInterceptTouchEvent() callback
This is needed to support nested scrolling A second GtkEventControllerLegacy gets registerd with GTK_PHASE_CAPTURE
This commit is contained in:
@@ -1547,6 +1547,9 @@ public final class MotionEvent extends InputEvent {
|
||||
// 0, 0, xPrecision, yPrecision,
|
||||
// downTime * NS_PER_MS, eventTime * NS_PER_MS,
|
||||
// 1, pp, pc);
|
||||
ev.action = action;
|
||||
ev.coord_x = x;
|
||||
ev.coord_y = y;
|
||||
return ev;
|
||||
}
|
||||
}
|
||||
@@ -2693,7 +2696,8 @@ public final class MotionEvent extends InputEvent {
|
||||
* @see #EDGE_BOTTOM
|
||||
*/
|
||||
public final int getEdgeFlags() {
|
||||
return nativeGetEdgeFlags(mNativePtr);
|
||||
// return nativeGetEdgeFlags(mNativePtr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ public class VelocityTracker {
|
||||
public void recycle() {}
|
||||
|
||||
public void computeCurrentVelocity(int units, float maxVelocity) {}
|
||||
public void computeCurrentVelocity(int units) {}
|
||||
|
||||
public float getXVelocity(int id) {return 0.f;}
|
||||
public float getYVelocity(int id) {return 0.f;}
|
||||
|
||||
@@ -1623,4 +1623,16 @@ public class View extends Object {
|
||||
}
|
||||
|
||||
public void removeOnAttachStateChangeListener(OnAttachStateChangeListener listener) {}
|
||||
|
||||
public boolean onInterceptTouchEvent(MotionEvent event) {return false;}
|
||||
|
||||
public boolean dispatchTouchEvent(MotionEvent event) {return false;}
|
||||
|
||||
public boolean canScrollHorizontally(int direction) {return false;}
|
||||
|
||||
protected native boolean native_getGlobalVisibleRect(long widget, Rect visibleRect);
|
||||
|
||||
public boolean getGlobalVisibleRect(Rect visibleRect) {
|
||||
return native_getGlobalVisibleRect(widget, visibleRect);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user