I have 2 links inside HTML code that is shown via a TextView. The first needs to open the URL in a webbrowser. The second needs to open another Activity in the App, so it must trigger some code in the App. Is this possible?
val textView = findViewById<TextView>(R.id.someTextView)
val html = "<ul>\n" +
"<li><a href=\\https://www.google.nl>Click here for google</a></li>\n" +
"<li><a href=\\scheme:open-something>Open App screen</a></li>\n" +
"</ul>\n"
textView.text = Html.fromHtml(html, Html.TO_HTML_PARAGRAPH_LINES_CONSECUTIVE)
TextView:
<TextView
android:id="@+id/someTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />