Stay organized with collections
Save and categorize content based on your preferences.
interface 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! |
Examines the matched text and either passes it through or uses the data in the Matcher state to produce a replacement.
|
Public methods
abstract fun transformUrl(
match: Matcher!,
url: String!
): String!
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 |
Return |
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Linkify.TransformFilter\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nTransformFilter\n===============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/text/util/Linkify.TransformFilter \"View this page in Java\") \n\n```\ninterface TransformFilter\n```\n\n|------------------------------------------------|\n| [android.text.util.Linkify.TransformFilter](#) |\n\nTransformFilter 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.\n\nSummary\n-------\n\n| Public methods ||\n|--------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [transformUrl](#transformUrl(java.util.regex.Matcher,%20kotlin.String))`(`match:` `[Matcher](../../../java/util/regex/Matcher.html#)!`, `url:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` 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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun transformUrl(\n match: Matcher!, \n url: String!\n): String!\n```\n\nExamines the matched text and either passes it through or uses the data in the Matcher state to produce a replacement.\n\n| Parameters ||\n|---------|--------------------------------------------------------------------------------------------------------------|\n| `match` | [Matcher](../../../java/util/regex/Matcher.html#)!: The regex matcher state that found this URL text |\n| `url` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: The text that was matched |\n\n| Return ||\n|-----------------------------------------------------------------------------------|---------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | The transformed form of the URL |"]]