Stay organized with collections
Save and categorize content based on your preferences.
public
static
interface
Linkify.TransformFilter
android.text.util.Linkify.TransformFilter
|
TransformFilter enables client code to have more control over
how matched patterns are represented as URLs.
For example: when converting a phone number such as (919) 555-1212
into a tel: URL the parentheses, white space, and hyphen need to be
removed to produce tel:9195551212.
Summary
Public methods |
abstract
String
|
transformUrl(Matcher match, String url)
Examines the matched text and either passes it through or uses the
data in the Matcher state to produce a replacement.
|
Public methods
public abstract String transformUrl (Matcher match,
String url)
Examines the matched text and either passes it through or uses the
data in the Matcher state to produce a replacement.
Parameters |
match |
Matcher : The regex matcher state that found this URL text |
url |
String : The text that was matched |
Returns |
String |
The transformed form of the URL |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# Linkify.TransformFilter\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nLinkify.TransformFilter\n=======================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/text/util/Linkify.TransformFilter \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nLinkify.TransformFilter\n`\n\n\n`\n\n\n`\n\n|-------------------------------------------|\n| android.text.util.Linkify.TransformFilter |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nTransformFilter enables client code to have more control over\nhow matched patterns are represented as URLs.\n\nFor example: when converting a phone number such as (919) 555-1212\ninto a tel: URL the parentheses, white space, and hyphen need to be\nremoved to produce tel:9195551212.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[String](/reference/java/lang/String) | ` `[transformUrl](/reference/android/text/util/Linkify.TransformFilter#transformUrl(java.util.regex.Matcher,%20java.lang.String))`(`[Matcher](/reference/java/util/regex/Matcher)` match, `[String](/reference/java/lang/String)` url) ` Examines the matched text and either passes it through or uses the data in the Matcher state to produce a replacement. |\n\nPublic methods\n--------------\n\n### transformUrl\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract String transformUrl (Matcher match, \n String url)\n```\n\nExamines the matched text and either passes it through or uses the\ndata in the Matcher state to produce a replacement.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|--------------------------------------------------------------------|\n| `match` | `Matcher`: The regex matcher state that found this URL text \u003cbr /\u003e |\n| `url` | `String`: The text that was matched \u003cbr /\u003e |\n\n| Returns ||\n|---------------------------------------|----------------------------------------|\n| [String](/reference/java/lang/String) | The transformed form of the URL \u003cbr /\u003e |"]]