Package 

Object Linkify


  • 
    public class Linkify
    
                        

    Utility for linkifying message text: scans a TextView for URLs, email addresses, and mention tokens (@user, @channel, @here, role mentions) referenced by a Message, and applies clickable spans for each.

    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.

    • Field Summary

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

      Modifier and Type Method Description
      final Unit addLinks(TextView textView, Message message) Scans the provided TextView and turns URLs, email addresses and every mention token present in message into clickable links.
      • Methods inherited from class java.lang.Object

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

      • addLinks

         final Unit addLinks(TextView textView, Message message)

        Scans the provided TextView and turns URLs, email addresses and every mention token present in message into clickable links.

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

        Parameters:
        textView - TextView whose text will be scanned and marked up with clickable spans.
        message - Message providing the mention tokens to linkify alongside URLs and email addresses.