Package 

Class DetoxAction

  • All Implemented Interfaces:

    
    public class DetoxAction
    
                        

    Created by simonracz on 10/07/2017.

    • Constructor Detail

    • Method Detail

      • scrollToEdge

         static ViewAction scrollToEdge(int edge)

        Scrolls to the edge of the given scrollable view.

        Parameters:
        edge - Direction to scroll (see MotionDir)
      • scrollInDirection

         static ViewAction scrollInDirection(int direction, double amountInDP, double startOffsetPercentX, double startOffsetPercentY)

        Scrolls the View in a direction by the Density Independent Pixel amount.

        Parameters:
        direction - Direction to scroll (see MotionDir)
        amountInDP - Density Independent Pixels
        startOffsetPercentX - Percentage denoting where X-swipe should start, with respect to the scrollable view.
        startOffsetPercentY - Percentage denoting where Y-swipe should start, with respect to the scrollable view.
      • scrollInDirectionStaleAtEdge

         static ViewAction scrollInDirectionStaleAtEdge(int direction, double amountInDP, double startOffsetPercentX, double startOffsetPercentY)

        Scroll the view in a direction by a specified amount (DP units). Similar to scrollInDirection, but stops gracefully in the case where the scrolling-edge is reached, by throwing the StaleActionException exception (i.e. so as to make this use case manageable by the user).

        Parameters:
        direction - Direction to scroll (see MotionDir)
        amountInDP - Density Independent Pixels
        startOffsetPercentX - Percentage denoting where X-swipe should start, with respect to the scrollable view.
        startOffsetPercentY - Percentage denoting where Y-swipe should start, with respect to the scrollable view.
      • swipeInDirection

         static ViewAction swipeInDirection(int direction, boolean fast, double normalizedOffset, double normalizedStartingPointX, double normalizedStartingPointY)

        Swipes the View in a direction.

        Parameters:
        direction - Direction to swipe (see MotionDir)
        fast - true if fast, false if slow
        normalizedOffset - or "swipe amount" between 0.0 and 1.
        normalizedStartingPointX - X coordinate of swipe starting point (between 0.0 and 1.
        normalizedStartingPointY - Y coordinate of swipe starting point (between 0.0 and 1.