Package icyllis.modernui.text.method
Interface MovementMethod
- All Known Implementing Classes:
ArrowKeyMovementMethod
,BaseMovementMethod
,LinkMovementMethod
,ScrollingMovementMethod
@ParametersAreNonnullByDefault
public interface MovementMethod
Provides cursor positioning, scrolling and text selection functionality in a
TextView
.
The TextView
delegates handling of key events, trackball motions and touches to
the movement method for purposes of content navigation. The framework automatically
selects an appropriate movement method based on the content of the TextView
.
This interface is intended for use by the framework; it should not be implemented directly by applications.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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.void
initialize
(TextView widget, Spannable text) boolean
onGenericMotionEvent
(TextView widget, Spannable text, MotionEvent event) boolean
boolean
void
onTakeFocus
(TextView widget, Spannable text, int direction) boolean
onTouchEvent
(TextView widget, Spannable text, MotionEvent event)
-
Method Details
-
initialize
-
onKeyDown
-
onKeyUp
-
onTakeFocus
-
onTouchEvent
-
onGenericMotionEvent
-
canSelectArbitrarily
boolean canSelectArbitrarily()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.
-