Interface TransitionContext

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void animate​(Animation animation)
      Registers and starts the animation that drives this transition.
      void blendIncoming​(int opacity)
      Blends the incoming content over the outgoing one at the given opacity and requests a render.
      int getContentHeight()
      Returns the height of the content area shared by both contents.
      int getContentWidth()
      Returns the width of the content area shared by both contents.
      Widget getIncomingContent()
      Returns the content of the page being entered.
      Widget getOutgoingContent()
      Returns the content of the page being left, or null when there is none.
      void positionContents​(int outgoingX, int outgoingY, int incomingX, int incomingY)
      Positions the outgoing and incoming contents within the content area and requests a render.
    • Method Detail

      • getOutgoingContent

        @Nullable
        Widget getOutgoingContent()
        Returns the content of the page being left, or null when there is none.
        Returns:
        the outgoing content, or null if there is none.
      • getIncomingContent

        Widget getIncomingContent()
        Returns the content of the page being entered.
        Returns:
        the incoming content.
      • getContentWidth

        int getContentWidth()
        Returns the width of the content area shared by both contents.
        Returns:
        the content width in pixels.
      • getContentHeight

        int getContentHeight()
        Returns the height of the content area shared by both contents.
        Returns:
        the content height in pixels.
      • positionContents

        void positionContents​(int outgoingX,
                              int outgoingY,
                              int incomingX,
                              int incomingY)
        Positions the outgoing and incoming contents within the content area and requests a render.

        Coordinates are relative to the top-left of the content area. When there is no outgoing content, its coordinates are ignored.

        Parameters:
        outgoingX - the x of the outgoing content.
        outgoingY - the y of the outgoing content.
        incomingX - the x of the incoming content.
        incomingY - the y of the incoming content.
      • blendIncoming

        void blendIncoming​(int opacity)
        Blends the incoming content over the outgoing one at the given opacity and requests a render.
        Parameters:
        opacity - the incoming content opacity, from 0 (fully transparent) to 255 (fully opaque).
      • animate

        void animate​(Animation animation)
        Registers and starts the animation that drives this transition.

        The navigator stops this animation if a new navigation interrupts the transition.

        Parameters:
        animation - the animation to run.