Touch
open class Touch
| kotlin.Any | |
| ↳ | android.text.method.Touch |
Summary
| Public methods | |
|---|---|
| open static Int |
getInitialScrollX(widget: TextView!, buffer: Spannable!) |
| open static Int |
getInitialScrollY(widget: TextView!, buffer: Spannable!) |
| open static Boolean |
onTouchEvent(widget: TextView!, buffer: Spannable!, event: MotionEvent!)Handles touch events for dragging. |
| open static Unit |
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 methods
getInitialScrollX
open static fun getInitialScrollX(
widget: TextView!,
buffer: Spannable!
): Int
| Parameters | |
|---|---|
widget |
TextView!: The text view. |
buffer |
Spannable!: The text buffer. |
getInitialScrollY
open static fun getInitialScrollY(
widget: TextView!,
buffer: Spannable!
): Int
| Parameters | |
|---|---|
widget |
TextView!: The text view. |
buffer |
Spannable!: The text buffer. |
onTouchEvent
open static fun onTouchEvent(
widget: TextView!,
buffer: Spannable!,
event: MotionEvent!
): Boolean
Handles touch events for dragging. You may want to do other actions like moving the cursor on touch as well.
scrollTo
open static fun scrollTo(
widget: TextView!,
layout: Layout!,
x: Int,
y: Int
): Unit
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.