4
我使用Linkify來檢測TextView中的標籤(#)。Android linkify不帶第一個字符
Pattern userMatcher = Pattern.compile("\\[email protected][^:\\s]+");
String userViewURL = "https://www.instagram.com/explore/tags/";
Linkify.addLinks(tvComment, userMatcher, userViewURL);
該網址應該以沒有'#'字符的文本結束。
我想用它來搜索的Instagram:
https://www.instagram.com/explore/tags/mytag
但Linkify打開一個網址以 '#' 字符:
https://www.instagram.com/explore/tags/#mytag
如何刪除 '#' 字符從Linkify創建的鏈接。
它的工作原理,謝謝。 –