Package icyllis.modernui.text.method

# Class LinkMovementMethod

java.lang.Object
icyllis.modernui.text.method.BaseMovementMethod
icyllis.modernui.text.method.ScrollingMovementMethod
icyllis.modernui.text.method.LinkMovementMethod

All Implemented Interfaces:
  `MovementMethod`

public class LinkMovementMethod extends ScrollingMovementMethod
A movement method that traverses links in the text buffer and scrolls if necessary. Supports clicking on links with DPad Center or Enter.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LinkMovementMethod()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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.
  `protected boolean`
  `down(TextView widget, Spannable buffer)`
  Performs a down movement action.
  `static MovementMethod`
  `getInstance()`
  `void`
  `initialize(TextView widget, Spannable text)`
  `protected boolean`
  `left(TextView widget, Spannable buffer)`
  Performs a left movement action.
  `void`
  `onTakeFocus(TextView view, Spannable text, int dir)`
  `boolean`
  `onTouchEvent(TextView widget, Spannable buffer, MotionEvent event)`
  `protected boolean`
  `right(TextView widget, Spannable buffer)`
  Performs a right movement action.
  `protected boolean`
  `up(TextView widget, Spannable buffer)`
  Performs an up movement action.

  ### Methods inherited from class icyllis.modernui.text.method.ScrollingMovementMethod

  `bottom, end, home, lineEnd, lineStart, pageDown, pageUp, top`

  ### Methods inherited from class icyllis.modernui.text.method.BaseMovementMethod

  `handleMovementKey, leftWord, onGenericMotionEvent, onKeyDown, onKeyUp, rightWord, scrollBottom, scrollDown, scrollLeft, scrollLineEnd, scrollLineStart, scrollPageDown, scrollPageUp, scrollRight, scrollTop, scrollUp`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LinkMovementMethod

    public LinkMovementMethod()

- ## Method Details

  - ### getInstance

    public static MovementMethod getInstance()

  - ### canSelectArbitrarily

    public boolean canSelectArbitrarily()
    Description copied from interface: `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.
    Specified by:
      `canSelectArbitrarily` in interface `MovementMethod`
    Overrides:
      `canSelectArbitrarily` in class `BaseMovementMethod`

  - ### up

    protected boolean up(TextView widget, Spannable buffer)
    Description copied from class: `BaseMovementMethod`
    Performs an up movement action. Moves the cursor or scrolls up by one line.
    Overrides:
      `up` in class `ScrollingMovementMethod`
    Parameters:
      `widget` - The text view.
      `buffer` - The text buffer.
    Returns:
      True if the event was handled.

  - ### down

    protected boolean down(TextView widget, Spannable buffer)
    Description copied from class: `BaseMovementMethod`
    Performs a down movement action. Moves the cursor or scrolls down by one line.
    Overrides:
      `down` in class `ScrollingMovementMethod`
    Parameters:
      `widget` - The text view.
      `buffer` - The text buffer.
    Returns:
      True if the event was handled.

  - ### left

    protected boolean left(TextView widget, Spannable buffer)
    Description copied from class: `BaseMovementMethod`
    Performs a left movement action. Moves the cursor or scrolls left by one character.
    Overrides:
      `left` in class `ScrollingMovementMethod`
    Parameters:
      `widget` - The text view.
      `buffer` - The text buffer.
    Returns:
      True if the event was handled.

  - ### right

    protected boolean right(TextView widget, Spannable buffer)
    Description copied from class: `BaseMovementMethod`
    Performs a right movement action. Moves the cursor or scrolls right by one character.
    Overrides:
      `right` in class `ScrollingMovementMethod`
    Parameters:
      `widget` - The text view.
      `buffer` - The text buffer.
    Returns:
      True if the event was handled.

  - ### onTouchEvent

    public boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event)
    Specified by:
      `onTouchEvent` in interface `MovementMethod`
    Overrides:
      `onTouchEvent` in class `ScrollingMovementMethod`

  - ### initialize

    public void initialize(TextView widget, Spannable text)
    Specified by:
      `initialize` in interface `MovementMethod`
    Overrides:
      `initialize` in class `BaseMovementMethod`

  - ### onTakeFocus

    public void onTakeFocus(TextView view, Spannable text, int dir)
    Specified by:
      `onTakeFocus` in interface `MovementMethod`
    Overrides:
      `onTakeFocus` in class `ScrollingMovementMethod`