Added in API level 1

ArrowKeyMovementMethod


open class ArrowKeyMovementMethod : BaseMovementMethod, MovementMethod
kotlin.Any
   ↳ android.text.method.BaseMovementMethod
   ↳ android.text.method.ArrowKeyMovementMethod

A movement method that provides cursor movement and selection. Supports displaying the context menu on DPad Center.

Summary

Public constructors

Public methods
open Boolean

open static MovementMethod!

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

open Boolean
nextParagraph(widget: TextView, buffer: Spannable)

Performs a next paragraph movement action.

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

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

open Boolean

Performs a previous paragraph movement action.

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

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

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

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

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

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

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

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

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

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

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

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

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

Inherited functions

Public constructors

ArrowKeyMovementMethod

ArrowKeyMovementMethod()

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

nextParagraph

Added in API level 34
open fun nextParagraph(
    widget: TextView,
    buffer: Spannable
): Boolean

Performs a next paragraph movement action.

Parameters
widget TextView: This value cannot be null.
buffer Spannable: This value cannot be null.
Return
Boolean true if the event was handled, otherwise false.

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

previousParagraph

Added in API level 34
open fun previousParagraph(
    widget: TextView,
    buffer: Spannable
): Boolean

Performs a previous paragraph movement action.

Parameters
widget TextView: This value cannot be null.
buffer Spannable: This value cannot be null.
Return
Boolean true if the event was handled, otherwise false.

Protected methods

bottom

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

down

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

end

Added in API level 11
protected open fun end(
    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.

home

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

left

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

lineEnd

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

lineStart

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

pageDown

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

pageUp

Added in API level 11
protected open fun pageUp(
    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 11
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.

top

Added in API level 11
protected open fun top(
    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 11
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.