I would like to have an indent or 2 spaces after the bullet. However, when I add   ; I still see the underline. And I wonder if there is not a better way to solve this? Also, when looking at the bullet, it is missing some pixels on the left side. Is this normal?
Solution must also work till API 18.
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val someText = findViewById<TextView>(R.id.someTextView)
val url = "<ul><li><a href='https://www.google.nl'> Awesome clickable link</a></li></ul>"
setEditText(someText, url)
}
fun setEditText(textView: TextView, text: String) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
textView.text = Html.fromHtml(text, Html.TO_HTML_PARAGRAPH_LINES_CONSECUTIVE)
} else {
textView.text = Html.fromHtml(text)
}
textView.movementMethod = LinkMovementMethod.getInstance()
}
activity_main.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:id="@+id/someTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
This solution does not work because I am getting html tags .