TextView clickableLinkTextView= (TextView) findViewById(R.id.tvHtmlLink); clickableLinkTextView.setText(getString(R.string.my_blog_link));
Next step is apply pattern on that URL which you want to open in Browser and pattern in Linkify. For more information about Linkify
Pattern pattern = Pattern.compile(getString(R.string.link)); Linkify.addLinks(clickableLinkTextView, pattern, "https://");
No comments:
Post a Comment