Closed wanGiB closed 3 years ago
Thanks!
Though it's very much possible and can be easily implemented (given that pattern and colorizing logic is already there), I'm not sure if this is needed. Most social media text fields do not support this behavior, except of course if we're talking about online forums.
But this library is always open for improvement, let's wait for others' input on this.
Sounds nice but it should be togglable.
Hi @hendraanggrian Can you please tell me have you fixed this issue?
this html is not working
I believe hyperlink colorization is working and configurable now, so I'm closing this issue.
Bro bagimana ya caranya supaya bisa bold text menggunakan SocialTextView? saya pakai Html.fromHtml tapi tidak bold text nya?
@guizot Malam bang. Karena semua TextView
yang implementasi SocialView
akan reset spanning setiap text berubah, bold spanningnya mesti manual di TextWatcher
:
textView.addTextChangedListener {
(textView.text as Spannable).setSpan(StyleSpan(Typeface.BOLD), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
}
Implementasinya gmn ya bro? TextWatcher
di taruh dimana?
ini XML saya
<com.hendraanggrian.appcompat.widget.SocialTextView android:id="@+id/chat_message_text_self" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawablePadding="8dp" app:hashtagColor="@color/colorPrimaryDark" app:mentionColor="@color/colorPrimaryDark" app:hyperlinkColor="@color/colorPrimaryDark"/>`
ini di Adapter saya
chat_message_text_self.text = Html.fromHtml(message).trim()
Hello, nice library here. I wanted to ask if it's possible to add support for rich text formatting like on WhatsApp and Slack such that when a user types any group of words between here it becomes bold and here becomes italic...