diff options
| -rw-r--r-- | core/java/android/view/View.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 4a3803ec6f15..21a342fadd44 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -8419,6 +8419,17 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * Implement this method to handle touch screen motion events. + * <p> + * If this method is used to detect click actions, it is recommended that + * the actions be performed by implementing and calling + * {@link #performClick()}. This will ensure consistent system behavior, + * including: + * <ul> + * <li>obeying click sound preferences + * <li>dispatching OnClickListener calls + * <li>handling {@link AccessibilityNodeInfo#ACTION_CLICK ACTION_CLICK} when + * accessibility features are enabled + * </ul> * * @param event The motion event. * @return True if the event was handled, false otherwise. |