问题描述
我正在使用 Linkify 使我的文本视图中的网络链接可点击。 但问题是当我点击这些链接时,它们是在默认浏览器中打开的。 但我想在我的应用程序中打开这些链接,比如 Gmail(当我们打开电子邮件链接时,将在 Gmail 应用程序中打开)。
这是我的代码
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView textView = findViewById(R.id.result);
textView.setText("http://example.com Testing Linkify for web links");
Linkify.addLinks(textView,Linkify.WEB_URLS);
}
}
谁能帮帮我...
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)