Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

Touch

extends Object
java.lang.Object
   ↳ android.text.method.Touch

Summary

Public Methods
static int getInitialScrollX ( TextView widget, Spannable buffer)
static int getInitialScrollY ( TextView widget, 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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static int getInitialScrollX ( TextView widget, Spannable buffer)

Added in API level 3

Parameters
widget The text view.
buffer The text buffer.

public static int getInitialScrollY ( TextView widget, Spannable buffer)

Added in API level 3

Parameters
widget The text view.
buffer The text buffer.

public static boolean onTouchEvent ( TextView widget, Spannable buffer, MotionEvent event)

Added in API level 1

Handles touch events for dragging. You may want to do other actions like moving the cursor on touch as well.

public static void scrollTo ( TextView widget, Layout layout, int x, int y)

Added in API level 1

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.