-
- All Implemented Interfaces:
-
org.readium.r2.navigator.input.InputListener
public final class DirectionalNavigationAdapter implements InputListener
Helper handling directional UI events (e.g. edge taps or arrow keys) to turn the pages of a VisualNavigator.
This takes into account the reading progression of the navigator to turn pages in the right direction.
Add it to a navigator with
addInputListener(DirectionalNavigationAdapter()).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumDirectionalNavigationAdapter.TapEdgeIndicates which viewport edges trigger page turns on tap.
-
Constructor Summary
Constructors Constructor Description DirectionalNavigationAdapter(OverflowableNavigator navigator, Set<DirectionalNavigationAdapter.TapEdge> tapEdges, Boolean handleTapsWhileScrolling, Double minimumHorizontalEdgeSize, Double horizontalEdgeThresholdPercent, Double minimumVerticalEdgeSize, Double verticalEdgeThresholdPercent, Boolean animatedTransition)
-
Method Summary
-
-
Constructor Detail
-
DirectionalNavigationAdapter
DirectionalNavigationAdapter(OverflowableNavigator navigator, Set<DirectionalNavigationAdapter.TapEdge> tapEdges, Boolean handleTapsWhileScrolling, Double minimumHorizontalEdgeSize, Double horizontalEdgeThresholdPercent, Double minimumVerticalEdgeSize, Double verticalEdgeThresholdPercent, Boolean animatedTransition)
- Parameters:
tapEdges- : Indicates which viewport edges handle taps.handleTapsWhileScrolling- : Indicates whether the page turns should be handled when the publication is scrollable.minimumHorizontalEdgeSize- : The minimum horizontal edge dimension triggering page turns, in pixels.horizontalEdgeThresholdPercent- : The percentage of the viewport dimension used to compute the horizontal edge size.minimumVerticalEdgeSize- : The minimum vertical edge dimension triggering page turns, in pixels.verticalEdgeThresholdPercent- : The percentage of the viewport dimension used to compute the vertical edge size.animatedTransition- : Indicates whether the page turns should be animated.
-
-
-
-