Object Linkify

  • All Implemented Interfaces:

    
    public class Linkify
    
                        

    Linkify links the part of the text based on matching pattern.

    This class is a simplified version of Linkify and differs only in one following way It doesn't remove any existing URLSpan from the Spannable.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static Linkify INSTANCE
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit addLinks(TextView textView) Scans the provided TextView and turns all occurrences of the link types into clickable links.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • addLinks

         final Unit addLinks(TextView textView)

        Scans the provided TextView and turns all occurrences of the link types into clickable links. If matches are found the movement method for the TextView is set to LinkMovementMethod.

        NOTE: Because this implementation doesn't remove existing URLSpan, make sure it is not repeatedly called on same text.

        Parameters:
        textView - TextView whose text is to be marked-up with links.