Package icyllis.modernui.text.method
Class ScrollingMovementMethod
java.lang.Object
icyllis.modernui.text.method.BaseMovementMethod
icyllis.modernui.text.method.ScrollingMovementMethod
- All Implemented Interfaces:
MovementMethod
- Direct Known Subclasses:
LinkMovementMethod
A movement method that interprets movement keys by scrolling the text buffer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanPerforms a bottom movement action.protected booleanPerforms a down movement action.protected booleanPerforms an end movement action.static MovementMethodprotected booleanPerforms a home movement action.protected booleanPerforms a left movement action.protected booleanPerforms a line-end movement action.protected booleanPerforms a line-start movement action.voidonTakeFocus(TextView widget, Spannable text, int dir) booleanonTouchEvent(TextView widget, Spannable buffer, MotionEvent event) protected booleanPerforms a page-down movement action.protected booleanPerforms a page-up movement action.protected booleanPerforms a right movement action.protected booleanPerforms a top movement action.protected booleanPerforms an up movement action.Methods inherited from class icyllis.modernui.text.method.BaseMovementMethod
canSelectArbitrarily, handleMovementKey, initialize, leftWord, onGenericMotionEvent, onKeyDown, onKeyUp, rightWord, scrollBottom, scrollDown, scrollLeft, scrollLineEnd, scrollLineStart, scrollPageDown, scrollPageUp, scrollRight, scrollTop, scrollUp
-
Constructor Details
-
ScrollingMovementMethod
public ScrollingMovementMethod()
-
-
Method Details
-
getInstance
-
left
Description copied from class:BaseMovementMethodPerforms a left movement action. Moves the cursor or scrolls left by one character.- Overrides:
leftin classBaseMovementMethod- Parameters:
widget- The text view.buffer- The text buffer.- Returns:
- True if the event was handled.
-
right
Description copied from class:BaseMovementMethodPerforms a right movement action. Moves the cursor or scrolls right by one character.- Overrides:
rightin classBaseMovementMethod- Parameters:
widget- The text view.buffer- The text buffer.- Returns:
- True if the event was handled.
-
up
Description copied from class:BaseMovementMethodPerforms an up movement action. Moves the cursor or scrolls up by one line.- Overrides:
upin classBaseMovementMethod- Parameters:
widget- The text view.buffer- The text buffer.- Returns:
- True if the event was handled.
-
down
Description copied from class:BaseMovementMethodPerforms a down movement action. Moves the cursor or scrolls down by one line.- Overrides:
downin classBaseMovementMethod- Parameters:
widget- The text view.buffer- The text buffer.- Returns:
- True if the event was handled.
-
pageUp
Description copied from class:BaseMovementMethodPerforms a page-up movement action. Moves the cursor or scrolls up by one page.- Overrides:
pageUpin classBaseMovementMethod- Parameters:
widget- The text view.buffer- The text buffer.- Returns:
- True if the event was handled.
-
pageDown
Description copied from class:BaseMovementMethodPerforms a page-down movement action. Moves the cursor or scrolls down by one page.- Overrides:
pageDownin classBaseMovementMethod- Parameters:
widget- The text view.buffer- The text buffer.- Returns:
- True if the event was handled.
-
top
Description copied from class:BaseMovementMethodPerforms a top movement action. Moves the cursor or scrolls to the top of the buffer.- Overrides:
topin classBaseMovementMethod- Parameters:
widget- The text view.buffer- The text buffer.- Returns:
- True if the event was handled.
-
bottom
Description copied from class:BaseMovementMethodPerforms a bottom movement action. Moves the cursor or scrolls to the bottom of the buffer.- Overrides:
bottomin classBaseMovementMethod- Parameters:
widget- The text view.buffer- The text buffer.- Returns:
- True if the event was handled.
-
lineStart
Description copied from class:BaseMovementMethodPerforms a line-start movement action. Moves the cursor or scrolls to the start of the line.- Overrides:
lineStartin classBaseMovementMethod- Parameters:
widget- The text view.buffer- The text buffer.- Returns:
- True if the event was handled.
-
lineEnd
Description copied from class:BaseMovementMethodPerforms a line-end movement action. Moves the cursor or scrolls to the end of the line.- Overrides:
lineEndin classBaseMovementMethod- Parameters:
widget- The text view.buffer- The text buffer.- Returns:
- True if the event was handled.
-
home
Description copied from class:BaseMovementMethodPerforms 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.- Overrides:
homein classBaseMovementMethod- Parameters:
widget- The text view.buffer- The text buffer.- Returns:
- True if the event was handled.
-
end
Description copied from class:BaseMovementMethodPerforms 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.- Overrides:
endin classBaseMovementMethod- Parameters:
widget- The text view.buffer- The text buffer.- Returns:
- True if the event was handled.
-
onTouchEvent
- Specified by:
onTouchEventin interfaceMovementMethod- Overrides:
onTouchEventin classBaseMovementMethod
-
onTakeFocus
- Specified by:
onTakeFocusin interfaceMovementMethod- Overrides:
onTakeFocusin classBaseMovementMethod
-