Most visited

Recently visited

Added in API level 1

ScrollingMovementMethod

public class ScrollingMovementMethod
extends BaseMovementMethod implements MovementMethod

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


通过滚动文本缓冲区来解释移动键的移动方法。

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)

执行底部移动动作。

boolean down(TextView widget, Spannable buffer)

执行向下移动动作。

boolean end(TextView widget, Spannable buffer)

执行结束移动操作。

boolean home(TextView widget, Spannable buffer)

执行家庭活动行动。

boolean left(TextView widget, Spannable buffer)

执行左移动作。

boolean lineEnd(TextView widget, Spannable buffer)

执行线端移动操作。

boolean lineStart(TextView widget, Spannable buffer)

执行行开始移动操作。

boolean pageDown(TextView widget, Spannable buffer)

执行向下翻页动作。

boolean pageUp(TextView widget, Spannable buffer)

执行翻页移动操作。

boolean right(TextView widget, Spannable buffer)

执行正确的移动操作。

boolean top(TextView widget, Spannable buffer)

执行顶级移动操作。

boolean up(TextView widget, Spannable buffer)

执行上移动作。

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)

执行底部移动动作。 移动光标或滚动到缓冲区的底部。

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)

执行向下移动动作。 移动光标或向下滚动一行。

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)

执行结束移动操作。 根据插入点正在移动还是正在滚动文档,将光标或滚动移动到行的开头或文档的顶部。

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)

执行家庭活动行动。 根据插入点正在移动还是正在滚动文档,将光标或滚动移动到行的开头或文档的顶部。

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)

执行左移动作。 移动光标或向左滚动一个字符。

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)

执行线端移动操作。 将光标或滚动移动到行的末尾。

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)

执行行开始移动操作。 将光标或滚动移动到行的开头。

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)

执行向下翻页动作。 移动光标或向下滚动一页。

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)

执行翻页移动操作。 移动光标或向上滚动一页。

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)

执行正确的移动操作。 移动光标或向右滚动一个字符。

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)

执行顶级移动操作。 将光标或滚动移动到缓冲区的顶部。

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)

执行上移动作。 移动光标或向上滚动一行。

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

Hooray!