Added in API level 1

LinkMovementMethod


open class LinkMovementMethod : ScrollingMovementMethod
kotlin.Any
   ↳ android.text.method.BaseMovementMethod
   ↳ android.text.method.ScrollingMovementMethod
   ↳ android.text.method.LinkMovementMethod

A movement method that traverses links in the text buffer and scrolls if necessary. Supports clicking on links with DPad Center or Enter.

Summary

Public constructors

Public methods
open Boolean

open static MovementMethod!

open Unit
initialize(widget: TextView!, text: Spannable!)

open Unit
onTakeFocus(view: TextView!, text: Spannable!, dir: Int)

open Boolean
onTouchEvent(widget: TextView!, buffer: Spannable!, event: MotionEvent!)

Protected methods
open Boolean
down(widget: TextView!, buffer: Spannable!)

open Boolean
handleMovementKey(widget: TextView!, buffer: Spannable!, keyCode: Int, movementMetaState: Int, event: KeyEvent!)

open Boolean
left(widget: TextView!, buffer: Spannable!)

open Boolean
right(widget: TextView!, buffer: Spannable!)

open Boolean
up(widget: TextView!, buffer: Spannable!)

Inherited functions

Public constructors

LinkMovementMethod

LinkMovementMethod()

Public methods

canSelectArbitrarily

Added in API level 1
open fun canSelectArbitrarily(): Boolean

getInstance

Added in API level 1
open static fun getInstance(): MovementMethod!

initialize

Added in API level 1
open fun initialize(
    widget: TextView!,
    text: Spannable!
): Unit

onTakeFocus

Added in API level 1
open fun onTakeFocus(
    view: TextView!,
    text: Spannable!,
    dir: Int
): Unit

onTouchEvent

Added in API level 1
open fun onTouchEvent(
    widget: TextView!,
    buffer: Spannable!,
    event: MotionEvent!
): Boolean

Protected methods

down

Added in API level 1
protected open fun down(
    widget: TextView!,
    buffer: Spannable!
): Boolean
Parameters
widget TextView!: The text view.
buffer Spannable!: The text buffer.
Return
Boolean True if the event was handled.

handleMovementKey

Added in API level 11
protected open fun handleMovementKey(
    widget: TextView!,
    buffer: Spannable!,
    keyCode: Int,
    movementMetaState: Int,
    event: KeyEvent!
): Boolean
Parameters
widget TextView!: The text view.
buffer Spannable!: The text buffer.
event KeyEvent!: The key event.
keyCode Int: The key code.
movementMetaState Int: The keyboard meta states used for movement.
Return
Boolean True if the event was handled.

left

Added in API level 1
protected open fun left(
    widget: TextView!,
    buffer: Spannable!
): Boolean
Parameters
widget TextView!: The text view.
buffer Spannable!: The text buffer.
Return
Boolean True if the event was handled.
Added in API level 1
protected open fun right(
    widget: TextView!,
    buffer: Spannable!
): Boolean
Parameters
widget TextView!: The text view.
buffer Spannable!: The text buffer.
Return
Boolean True if the event was handled.

up

Added in API level 1
protected open fun up(
    widget: TextView!,
    buffer: Spannable!
): Boolean
Parameters
widget TextView!: The text view.
buffer Spannable!: The text buffer.
Return
Boolean True if the event was handled.