So I have a text itch contain a lot of markup in android and I got them from an api I want to go to open an other activity when I click on a specific markup
Asked
Active
Viewed 37 times
2 Answers
0
You must be opening it in webview. in that case:
webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if ("http://www.google.com".equals(url)) {
webView.destroy();
Intent intent = new Intent(CurrentActivity.this,NewActivity.class);
CurrentActivity.this.startActivity(intent);
} else {
view.loadUrl(url, NetworkUtil.getHeaders());
}
return false;
}
});

Kishita Variya
- 810
- 9
- 19