Package org.mozilla.geckoview
Class PanZoomController.InputResultDetail
Object
org.mozilla.geckoview.PanZoomController.InputResultDetail
- Enclosing class:
- PanZoomController
Represents how a
MotionEvent was handled in Gecko. This value can be used by browser
apps to implement features like pull-to-refresh. Failing to account this value might break some
websites expectations about touch events.
For example, a handledResult() value of PanZoomController.INPUT_RESULT_HANDLED and overscrollDirections() of PanZoomController.OVERSCROLL_FLAG_NONE indicates that the event was consumed for a panning or
zooming operation and that the website does not expect the browser to react to the touch event
(say, by triggering the pull-to-refresh feature) even though the scroll container reached to
the edge.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInputResultDetail(int handledResult, int scrollableDirections, int overscrollDirections) Creates a detail object describing how a MotionEvent was handled. -
Method Summary
Modifier and TypeMethodDescriptionintintint
-
Constructor Details
-
InputResultDetail
protected InputResultDetail(int handledResult, int scrollableDirections, int overscrollDirections) Creates a detail object describing how a MotionEvent was handled.- Parameters:
handledResult- one ofPanZoomController.INPUT_RESULT_UNHANDLED,PanZoomController.INPUT_RESULT_HANDLED,PanZoomController.INPUT_RESULT_HANDLED_CONTENT, orPanZoomController.INPUT_RESULT_IGNOREDscrollableDirections- an OR-edPanZoomController.ScrollableDirectionsvalue indicating which directions were scrollable when the event firedoverscrollDirections- an OR-edPanZoomController.OverscrollDirectionsvalue indicating which directions were overscrollable when the event fired
-
-
Method Details
-
handledResult
@AnyThread public int handledResult()- Returns:
- One of the
INPUT_RESULT_*indicating how the event was handled.
-
scrollableDirections
@AnyThread public int scrollableDirections()- Returns:
- an OR-ed value of
SCROLLABLE_FLAG_*indicating which directions can be scrollable.
-
overscrollDirections
@AnyThread public int overscrollDirections()- Returns:
- an OR-ed value of
OVERSCROLL_FLAG_*indicating which directions can be over-scrollable.
-