Class CatchableLinkMovementMethod

  • All Implemented Interfaces:
    android.text.method.MovementMethod

    
    public final class CatchableLinkMovementMethod
    extends LinkMovementMethod
                        

    Custom MovementMethod allowing to check the clicked link before opening the browser. It is based on LinkMovementMethod, only the onTouchEvent is overridden to add a call to the listener before it performs the Open action. Source : http://stackoverflow.com/questions/1697084/handle-textview-link-click-in-my-android-app Core Android source : https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/text/method/LinkMovementMethod.java

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event)
      • Methods inherited from class android.text.method.LinkMovementMethod

        canSelectArbitrarily, initialize, onTakeFocus
      • Methods inherited from class android.text.method.BaseMovementMethod

        onGenericMotionEvent, onKeyDown, onKeyOther, onKeyUp, onTrackballEvent
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CatchableLinkMovementMethod

        CatchableLinkMovementMethod(Function1<String, Boolean> listener)
    • Method Detail