java.lang.Object | |
↳ | android.text.method.BaseMovementMethod |
Known Direct Subclasses |
Known Indirect Subclasses |
Base classes for movement methods.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns true if this movement method allows arbitrary selection
of any text; false if it has no selection (like a movement method
that only scrolls) or a constrained selection (for example
limited to links.
| |||||||||||
If the key listener wants to other kinds of key events, return true,
otherwise return false and the caller (i.e.
| |||||||||||
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Performs a bottom movement action.
| |||||||||||
Performs a down movement action.
| |||||||||||
Performs an end movement action.
| |||||||||||
Gets the meta state used for movement using the modifiers tracked by the text
buffer as well as those present in the key event.
| |||||||||||
Performs a movement key action.
| |||||||||||
Performs a home movement action.
| |||||||||||
Performs a left movement action.
| |||||||||||
Performs a line-end movement action.
| |||||||||||
Performs a line-start movement action.
| |||||||||||
Performs a page-down movement action.
| |||||||||||
Performs a page-up movement action.
| |||||||||||
Performs a right movement action.
| |||||||||||
Performs a top movement action.
| |||||||||||
Performs an up movement action.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.text.method.MovementMethod
|
Returns true if this movement method allows arbitrary selection of any text; false if it has no selection (like a movement method that only scrolls) or a constrained selection (for example limited to links. The "Select All" menu item is disabled if arbitrary selection is not allowed.
If the key listener wants to other kinds of key events, return true, otherwise return false and the caller (i.e. the widget host) will handle the key.
Performs a bottom movement action. Moves the cursor or scrolls to the bottom of the buffer.
widget | The text view. |
---|---|
buffer | The text buffer. |
Performs a down movement action. Moves the cursor or scrolls down by one line.
widget | The text view. |
---|---|
buffer | The text 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.
widget | The text view. |
---|---|
buffer | The text buffer. |
Gets the meta state used for movement using the modifiers tracked by the text buffer as well as those present in the key event. The movement meta state excludes the state of locked modifiers or the SHIFT key since they are not used by movement actions (but they may be used for selection).
buffer | The text buffer. |
---|---|
event | The key event. |
Performs a movement key action.
The default implementation decodes the key down and invokes movement actions
such as down(TextView, Spannable)
and up(TextView, Spannable)
.
onKeyDown(TextView, Spannable, int, KeyEvent)
calls this method once
to handle an ACTION_DOWN
.
onKeyOther(TextView, Spannable, KeyEvent)
calls this method repeatedly
to handle each repetition of an ACTION_MULTIPLE
.
widget | The text view. |
---|---|
buffer | The text buffer. |
keyCode | The key code. |
movementMetaState | The keyboard meta states used for movement. |
event | The key event. |
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.
widget | The text view. |
---|---|
buffer | The text buffer. |
Performs a left movement action. Moves the cursor or scrolls left by one character.
widget | The text view. |
---|---|
buffer | The text buffer. |
Performs a line-end movement action. Moves the cursor or scrolls to the end of the line.
widget | The text view. |
---|---|
buffer | The text buffer. |
Performs a line-start movement action. Moves the cursor or scrolls to the start of the line.
widget | The text view. |
---|---|
buffer | The text buffer. |
Performs a page-down movement action. Moves the cursor or scrolls down by one page.
widget | The text view. |
---|---|
buffer | The text buffer. |
Performs a page-up movement action. Moves the cursor or scrolls up by one page.
widget | The text view. |
---|---|
buffer | The text buffer. |
Performs a right movement action. Moves the cursor or scrolls right by one character.
widget | The text view. |
---|---|
buffer | The text buffer. |
Performs a top movement action. Moves the cursor or scrolls to the top of the buffer.
widget | The text view. |
---|---|
buffer | The text buffer. |
Performs an up movement action. Moves the cursor or scrolls up by one line.
widget | The text view. |
---|---|
buffer | The text buffer. |