Android – Creating links using linkify

  Linkify is a class that lets you create links from a TextView or a Spannable. You can create links not just to web pages, but also to locations on the map, emails and even phone numbers. *Note: the examples bellow may not always work in the emulator. Web address: Phone number: Map address: Email address: Auto detect: Use Linkify.ALL to automatically detect the link type. More than one option: You can choose more than a single option for the link type. Using pattern: You can use a regular expression for detecting text parts and transform only them to links instead of the whole text. MatchFilter: MatchFilter is used for more complicated filters. TransformFilter: So fat the text we have filtered stayed the same. But sometimes you need the text to be different than the text which is appended to the link. Download code example