Skip to content

Conversation

@mickael-menu
Copy link
Member

Added

Navigator

  • A new convenience utility EdgeTapNavigation to trigger page turns while tapping the screen edges.
    • It takes into account the navigator reading progression to move into the right direction.
    • Call it from the VisualNavigator.Listener.onTap() callback as demonstrated below:
    override fun onTap(point: PointF): Boolean {
        val navigated = edgeTapNavigation.onTap(point, requireView())
        if (!navigated) {
            // Fallback action, for example toggling the app bar.
        }
        return true
    }

This utility is useful for two reasons:

  • We want to let the apps have total control over the tap events, and decide whether or not to handle page turns with edge taps.
  • Implementing the edge taps properly (taking into account the reading progression) is not so easy.

@mickael-menu mickael-menu requested a review from qnga November 8, 2021 17:46
Copy link
Member

@qnga qnga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

@mickael-menu mickael-menu merged commit c801648 into develop Nov 9, 2021
@mickael-menu mickael-menu deleted the feature/edge-taps branch November 9, 2021 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants