Loading core/java/android/view/TouchDelegate.java +20 −26 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ public class TouchDelegate { /** * mBounds inflated to include some slop. This rect is to track whether the motion events * should be considered to be be within the delegate view. * should be considered to be within the delegate view. */ private Rect mSlopBounds; Loading @@ -64,14 +64,12 @@ public class TouchDelegate { public static final int BELOW = 2; /** * The touchable region of the View extends to the left of its * actual extent. * The touchable region of the View extends to the left of its actual extent. */ public static final int TO_LEFT = 4; /** * The touchable region of the View extends to the right of its * actual extent. * The touchable region of the View extends to the right of its actual extent. */ public static final int TO_RIGHT = 8; Loading Loading @@ -109,12 +107,8 @@ public class TouchDelegate { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: Rect bounds = mBounds; if (bounds.contains(x, y)) { mDelegateTargeted = true; sendToDelegate = true; } mDelegateTargeted = mBounds.contains(x, y); sendToDelegate = mDelegateTargeted; break; case MotionEvent.ACTION_UP: case MotionEvent.ACTION_MOVE: Loading Loading
core/java/android/view/TouchDelegate.java +20 −26 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ public class TouchDelegate { /** * mBounds inflated to include some slop. This rect is to track whether the motion events * should be considered to be be within the delegate view. * should be considered to be within the delegate view. */ private Rect mSlopBounds; Loading @@ -64,14 +64,12 @@ public class TouchDelegate { public static final int BELOW = 2; /** * The touchable region of the View extends to the left of its * actual extent. * The touchable region of the View extends to the left of its actual extent. */ public static final int TO_LEFT = 4; /** * The touchable region of the View extends to the right of its * actual extent. * The touchable region of the View extends to the right of its actual extent. */ public static final int TO_RIGHT = 8; Loading Loading @@ -109,12 +107,8 @@ public class TouchDelegate { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: Rect bounds = mBounds; if (bounds.contains(x, y)) { mDelegateTargeted = true; sendToDelegate = true; } mDelegateTargeted = mBounds.contains(x, y); sendToDelegate = mDelegateTargeted; break; case MotionEvent.ACTION_UP: case MotionEvent.ACTION_MOVE: Loading