disable text fields for location messages (workaround)

i tried to suppress that zip codes are shown as clickable telephopne numbers. but
  android:autoLink="none"
and
  messageText!!.linksClickable = false
don't seem to work.
as a workaround i disabled the text field completely. so the links are still underlined but nut clickable. and it's also not possible now to mark text and get the context menu.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2021-06-08 13:59:54 +02:00 committed by Andy Scherzinger
parent 3cb0fe75b1
commit 22333d2f57
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 2 additions and 0 deletions

View file

@ -174,6 +174,7 @@ class IncomingLocationMessageViewHolder(incomingView: View) : MessageHolders
val textSize = context?.resources!!.getDimension(R.dimen.chat_text_size)
messageText!!.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize)
messageText!!.text = message.text
messageText!!.isEnabled = false
// parent message handling

View file

@ -125,6 +125,7 @@ class OutcomingLocationMessageViewHolder(incomingView: View) : MessageHolders
messageText!!.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize)
messageTimeView!!.layoutParams = layoutParams
messageText!!.text = message.text
messageText!!.isEnabled = false
// parent message handling