public static interface Linkify.TransformFilter
| android.text.util.Linkify.TransformFilter |
TransformFilter使客户端代码可以更好地控制如何将匹配的模式表示为URL。 例如:将电话号码(如(919)555-1212)转换为tel:URL时,需要删除括号,空格和连字符以生成tel:9195551212。
公共方法(Public methods) |
|
|---|---|
abstract String |
transformUrl(Matcher match, String url) 检查匹配的文本并将其传递或使用Matcher状态中的数据生成替换。 |
String transformUrl (Matcher match, String url)
检查匹配的文本并将其传递或使用Matcher状态中的数据生成替换。
| 参数(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 |