Skip to content

Most visited

Recently visited

navigation

ScrollingMovementMethod

public class ScrollingMovementMethod
extends BaseMovementMethod implements MovementMethod

java.lang.Object
   ↳ android.text.method.BaseMovementMethod
     ↳ android.text.method.ScrollingMovementMethod
Known Direct Subclasses


A movement method that interprets movement keys by scrolling the text buffer.

Summary

Public constructors

ScrollingMovementMethod()

Public methods

static MovementMethod getInstance()
void onTakeFocus(TextView widget, Spannable text, int dir)
boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event)

Protected methods

boolean bottom(TextView widget, Spannable buffer)

Performs a bottom movement action.

boolean down(TextView widget, Spannable buffer)

Performs a down movement action.

boolean end(TextView widget, Spannable buffer)

Performs an end movement action.

boolean home(TextView widget, Spannable buffer)

Performs a home movement action.

boolean left(TextView widget, Spannable buffer)

Performs a left movement action.

boolean lineEnd(TextView widget, Spannable buffer)

Performs a line-end movement action.

boolean lineStart(TextView widget, Spannable buffer)

Performs a line-start movement action.

boolean pageDown(TextView widget, Spannable buffer)

Performs a page-down movement action.

boolean pageUp(TextView widget, Spannable buffer)

Performs a page-up movement action.

boolean right(TextView widget, Spannable buffer)

Performs a right movement action.

boolean top(TextView widget, Spannable buffer)

Performs a top movement action.

boolean up(TextView widget, Spannable buffer)

Performs an up movement action.

Inherited methods

From class android.text.method.BaseMovementMethod
From class java.lang.Object
From interface android.text.method.MovementMethod

Public constructors

ScrollingMovementMethod

Added in API level 1
ScrollingMovementMethod ()

Public methods

getInstance

Added in API level 1
MovementMethod getInstance ()

Returns
MovementMethod

onTakeFocus

Added in API level 1
void onTakeFocus (TextView widget, 
                Spannable text, 
                int dir)

Parameters
widget TextView
text Spannable
dir int

onTouchEvent

Added in API level 1
boolean onTouchEvent (TextView widget, 
                Spannable buffer, 
                MotionEvent event)

Parameters
widget TextView
buffer Spannable
event MotionEvent
Returns
boolean

Protected methods

bottom

Added in API level 11
boolean bottom (TextView widget, 
                Spannable buffer)

Performs a bottom movement action. Moves the cursor or scrolls to the bottom of the buffer.

Parameters
widget TextView: The text view.
buffer Spannable: The text buffer.
Returns
boolean True if the event was handled.

down

Added in API level 1
boolean down (TextView widget, 
                Spannable buffer)

Performs a down movement action. Moves the cursor or scrolls down by one line.

Parameters
widget TextView: The text view.
buffer Spannable: The text buffer.
Returns
boolean True if the event was handled.

end

Added in API level 11
boolean end (TextView widget, 
                Spannable buffer)

Performs an end movement action. Moves the cursor or scrolls to the start of the line or to the top of the document depending on whether the insertion point is being moved or the document is being scrolled.

Parameters
widget TextView: The text view.
buffer Spannable: The text buffer.
Returns
boolean True if the event was handled.

home

Added in API level 11
boolean home (TextView widget, 
                Spannable buffer)

Performs a home movement action. Moves the cursor or scrolls to the start of the line or to the top of the document depending on whether the insertion point is being moved or the document is being scrolled.

Parameters
widget TextView: The text view.
buffer Spannable: The text buffer.
Returns
boolean True if the event was handled.

left

Added in API level 1
boolean left (TextView widget, 
                Spannable buffer)

Performs a left movement action. Moves the cursor or scrolls left by one character.

Parameters
widget TextView: The text view.
buffer Spannable: The text buffer.
Returns
boolean True if the event was handled.

lineEnd

Added in API level 11
boolean lineEnd (TextView widget, 
                Spannable buffer)

Performs a line-end movement action. Moves the cursor or scrolls to the end of the line.

Parameters
widget TextView: The text view.
buffer Spannable: The text buffer.
Returns
boolean True if the event was handled.

lineStart

Added in API level 11
boolean lineStart (TextView widget, 
                Spannable buffer)

Performs a line-start movement action. Moves the cursor or scrolls to the start of the line.

Parameters
widget TextView: The text view.
buffer Spannable: The text buffer.
Returns
boolean True if the event was handled.

pageDown

Added in API level 11
boolean pageDown (TextView widget, 
                Spannable buffer)

Performs a page-down movement action. Moves the cursor or scrolls down by one page.

Parameters
widget TextView: The text view.
buffer Spannable: The text buffer.
Returns
boolean True if the event was handled.

pageUp

Added in API level 11
boolean pageUp (TextView widget, 
                Spannable buffer)

Performs a page-up movement action. Moves the cursor or scrolls up by one page.

Parameters
widget TextView: The text view.
buffer Spannable: The text buffer.
Returns
boolean True if the event was handled.

right

Added in API level 1
boolean right (TextView widget, 
                Spannable buffer)

Performs a right movement action. Moves the cursor or scrolls right by one character.

Parameters
widget TextView: The text view.
buffer Spannable: The text buffer.
Returns
boolean True if the event was handled.

top

Added in API level 11
boolean top (TextView widget, 
                Spannable buffer)

Performs a top movement action. Moves the cursor or scrolls to the top of the buffer.

Parameters
widget TextView: The text view.
buffer Spannable: The text buffer.
Returns
boolean True if the event was handled.

up

Added in API level 1
boolean up (TextView widget, 
                Spannable buffer)

Performs an up movement action. Moves the cursor or scrolls up by one line.

Parameters
widget TextView: The text view.
buffer Spannable: The text buffer.
Returns
boolean True if the event was handled.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.