Added in API level 1

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
scrollTo(widget: TextView!, layout: Layout!, x: Int, y: Int)

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

Added in API level 3
open static fun getInitialScrollX(
    widget: TextView!,
    buffer: Spannable!
): Int
Parameters
widget TextView!: The text view.
buffer Spannable!: The text buffer.

getInitialScrollY

Added in API level 3
open static fun getInitialScrollY(
    widget: TextView!,
    buffer: Spannable!
): Int
Parameters
widget TextView!: The text view.
buffer Spannable!: The text buffer.

onTouchEvent

Added in API level 1
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

Added in API level 1
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.