public class Touch extends Object
Modifier and Type | Method and Description |
---|---|
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.
|
public static void scrollTo(TextView widget, Layout layout, int x, int y)
public static boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event)
public static int getInitialScrollX(TextView widget, Spannable buffer)
widget
- The text view.buffer
- The text buffer.