-3

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

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

2 Answers2

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
0

add an onClickListener, then create the specific intent and start the new Activity.

Ibron
  • 3
  • 3