Package icyllis.modernui.text.method

# Class Touch

java.lang.Object
icyllis.modernui.text.method.Touch

@ParametersAreNonnullByDefault public class Touch extends Object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `getInitialScrollX(Spannable buffer)`
  `static int`
  `getInitialScrollY(Spannable buffer)`
  `static boolean`
  `onTouchEvent(TextView widget, Spannable buffer, MotionEvent event)`
  Handles touch events for dragging.
  `static void`
  `scrollTo(TextView widget, Layout layout, int x, int y)`
  Scrolls the specified widget to the specified coordinates, except constrains the X scrolling position to the horizontal regions of the text that will be visible after scrolling to the specified Y position.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### scrollTo

    public static void scrollTo(TextView widget, Layout layout, int x, int y)
    Scrolls the specified widget to the specified coordinates, except constrains the X scrolling position to the horizontal regions of the text that will be visible after scrolling to the specified Y position.

  - ### onTouchEvent

    public static boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event)
    Handles touch events for dragging. You may want to do other actions like moving the cursor on touch as well.

  - ### getInitialScrollX

    public static int getInitialScrollX(Spannable buffer)
    Parameters:
      `buffer` - The text buffer.

  - ### getInitialScrollY

    public static int getInitialScrollY(Spannable buffer)
    Parameters:
      `buffer` - The text buffer.