Loading core/java/android/view/View.java +4 −4 Original line number Diff line number Diff line Loading @@ -4674,8 +4674,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility } /** * Default implementation of {@link KeyEvent.Callback#onKeyMultiple(int, int, KeyEvent) * KeyEvent.Callback.onKeyMultiple()}: perform press of the view * Default implementation of {@link KeyEvent.Callback#onKeyDown(int, KeyEvent) * KeyEvent.Callback.onKeyDown()}: perform press of the view * when {@link KeyEvent#KEYCODE_DPAD_CENTER} or {@link KeyEvent#KEYCODE_ENTER} * is released, if the view is enabled and clickable. * Loading Loading @@ -4718,8 +4718,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility } /** * Default implementation of {@link KeyEvent.Callback#onKeyMultiple(int, int, KeyEvent) * KeyEvent.Callback.onKeyMultiple()}: perform clicking of the view * Default implementation of {@link KeyEvent.Callback#onKeyUp(int, KeyEvent) * KeyEvent.Callback.onKeyUp()}: perform clicking of the view * when {@link KeyEvent#KEYCODE_DPAD_CENTER} or * {@link KeyEvent#KEYCODE_ENTER} is released. * Loading core/java/android/view/ViewGroup.java +8 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.graphics.PointF; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Region; import android.os.Build; import android.os.Parcelable; import android.os.SystemClock; import android.util.AttributeSet; Loading Loading @@ -350,6 +351,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager mGroupFlags |= FLAG_ANIMATION_CACHE; mGroupFlags |= FLAG_ALWAYS_DRAWN_WITH_CACHE; if (mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.HONEYCOMB) { mGroupFlags |= FLAG_SPLIT_MOTION_EVENTS; } setDescendantFocusability(FOCUS_BEFORE_DESCENDANTS); mChildren = new View[ARRAY_INITIAL_CAPACITY]; Loading Loading @@ -1568,7 +1573,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager /** * Enable or disable the splitting of MotionEvents to multiple children during touch event * dispatch. This behavior is disabled by default. * dispatch. This behavior is enabled by default for applications that target an * SDK version of {@link Build.VERSION_CODES#HONEYCOMB} or newer. * * <p>When this option is enabled MotionEvents may be split and dispatched to different child * views depending on where each pointer initially went down. This allows for user interactions Loading @@ -1591,6 +1597,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } /** * Returns true if MotionEvents dispatched to this ViewGroup can be split to multiple children. * @return true if MotionEvents dispatched to this ViewGroup can be split to multiple children. */ public boolean isMotionEventSplittingEnabled() { Loading Loading
core/java/android/view/View.java +4 −4 Original line number Diff line number Diff line Loading @@ -4674,8 +4674,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility } /** * Default implementation of {@link KeyEvent.Callback#onKeyMultiple(int, int, KeyEvent) * KeyEvent.Callback.onKeyMultiple()}: perform press of the view * Default implementation of {@link KeyEvent.Callback#onKeyDown(int, KeyEvent) * KeyEvent.Callback.onKeyDown()}: perform press of the view * when {@link KeyEvent#KEYCODE_DPAD_CENTER} or {@link KeyEvent#KEYCODE_ENTER} * is released, if the view is enabled and clickable. * Loading Loading @@ -4718,8 +4718,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility } /** * Default implementation of {@link KeyEvent.Callback#onKeyMultiple(int, int, KeyEvent) * KeyEvent.Callback.onKeyMultiple()}: perform clicking of the view * Default implementation of {@link KeyEvent.Callback#onKeyUp(int, KeyEvent) * KeyEvent.Callback.onKeyUp()}: perform clicking of the view * when {@link KeyEvent#KEYCODE_DPAD_CENTER} or * {@link KeyEvent#KEYCODE_ENTER} is released. * Loading
core/java/android/view/ViewGroup.java +8 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.graphics.PointF; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Region; import android.os.Build; import android.os.Parcelable; import android.os.SystemClock; import android.util.AttributeSet; Loading Loading @@ -350,6 +351,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager mGroupFlags |= FLAG_ANIMATION_CACHE; mGroupFlags |= FLAG_ALWAYS_DRAWN_WITH_CACHE; if (mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.HONEYCOMB) { mGroupFlags |= FLAG_SPLIT_MOTION_EVENTS; } setDescendantFocusability(FOCUS_BEFORE_DESCENDANTS); mChildren = new View[ARRAY_INITIAL_CAPACITY]; Loading Loading @@ -1568,7 +1573,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager /** * Enable or disable the splitting of MotionEvents to multiple children during touch event * dispatch. This behavior is disabled by default. * dispatch. This behavior is enabled by default for applications that target an * SDK version of {@link Build.VERSION_CODES#HONEYCOMB} or newer. * * <p>When this option is enabled MotionEvents may be split and dispatched to different child * views depending on where each pointer initially went down. This allows for user interactions Loading @@ -1591,6 +1597,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } /** * Returns true if MotionEvents dispatched to this ViewGroup can be split to multiple children. * @return true if MotionEvents dispatched to this ViewGroup can be split to multiple children. */ public boolean isMotionEventSplittingEnabled() { Loading