PageAdapter: do not underline links, it's boring
This commit is contained in:
parent
2b694a0bc1
commit
e8283d2ed4
|
@ -148,9 +148,7 @@ class PageAdapter(private val listener: ContentAdapterListener) :
|
||||||
}
|
}
|
||||||
is ContentBlock.Link -> {
|
is ContentBlock.Link -> {
|
||||||
val label = if (block.label.isNotBlank()) block.label else block.url
|
val label = if (block.label.isNotBlank()) block.label else block.url
|
||||||
val underlinedLabel = SpannableString(label)
|
(holder as ContentViewHolder.Link).binding.textView.text = label
|
||||||
underlinedLabel.setSpan(UnderlineSpan(), 0, underlinedLabel.length, 0)
|
|
||||||
(holder as ContentViewHolder.Link).binding.textView.text = underlinedLabel
|
|
||||||
holder.binding.root.setOnClickListener { listener.onLinkClick(block.url) }
|
holder.binding.root.setOnClickListener { listener.onLinkClick(block.url) }
|
||||||
}
|
}
|
||||||
is ContentBlock.Pre ->
|
is ContentBlock.Pre ->
|
||||||
|
|
Reference in a new issue