Remove clickable underline
package com.github.pockethub.android.util.android.text
import android.text.SpannableStringBuilder
+import android.text.TextPaint
import android.text.style.ClickableSpan
import android.text.style.TypefaceSpan
-import android.text.style.URLSpan
import android.view.View
import androidx.core.text.inSpans
import com.github.pockethub.android.util.TimeUtils
@@ -20,6 +20,11 @@ fun SpannableStringBuilder.clickable(
override fun onClick(widget: View) {
onClick(widget)
}
+
+ override fun updateDrawState(ds: TextPaint) {
+ super.updateDrawState(ds)
+ ds.isUnderlineText = false
+ }
}, builderAction = builderAction)
fun SpannableStringBuilder.append(date: Date) {
