- e
- The motion event that describes the hover.
Documentation for this section has not yet been entered.
Implement this method to intercept hover events before they are handled by child views.
This method is called before dispatching a hover event to a child of the view group or to the view group's own View.OnHoverEvent(MotionEvent) to allow the view group a chance to intercept the hover event. This method can also be used to watch all pointer motions that occur within the bounds of the view group even when the pointer is hovering over a child of the view group rather than over the view group itself.
The view group can prevent its children from receiving hover events by implementing this method and returning true to indicate that it would like to intercept hover events. The view group must continuously return true from ViewGroup.OnInterceptHoverEvent(MotionEvent) for as long as it wishes to continue intercepting hover events from its children.
Interception preserves the invariant that at most one view can be hovered at a time by transferring hover focus from the currently hovered child to the view group or vice-versa as needed.
If this method returns true and a child is already hovered, then the child view will first receive a hover exit event and then the view group itself will receive a hover enter event in View.OnHoverEvent(MotionEvent). Likewise, if this method had previously returned true to intercept hover events and instead returns false while the pointer is hovering within the bounds of one of a child, then the view group will first receive a hover exit event in View.OnHoverEvent(MotionEvent) and then the hovered child will receive a hover enter event.
The default implementation always returns false.