mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-09 13:59:48 +01:00
label styling
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
a133804f65
commit
f418955e1d
@ -35,7 +35,7 @@ class ChatUtils {
|
||||
resultMessage?.replace("{$key}", "@" + individualHashMap["name"])
|
||||
} else if (type == "geo-location") {
|
||||
individualHashMap["name"]
|
||||
} else if (individualHashMap.containsKey("link") == true) {
|
||||
} else if (individualHashMap.containsKey("link")) {
|
||||
if (type == "file") {
|
||||
resultMessage?.replace("{$key}", individualHashMap["name"].toString())
|
||||
} else {
|
||||
|
@ -8,12 +8,12 @@ package com.nextcloud.talk.utils.message
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.graphics.Typeface
|
||||
import android.net.Uri
|
||||
import android.text.SpannableString
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.text.Spanned
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.text.style.StyleSpan
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import com.nextcloud.talk.R
|
||||
@ -152,13 +152,12 @@ class MessageUtils(val context: Context) {
|
||||
val end = start + placeholder.length
|
||||
spannable.replace(start, end, replacementText)
|
||||
spannable.setSpan(
|
||||
ForegroundColorSpan(Color.BLUE),
|
||||
StyleSpan(Typeface.BOLD),
|
||||
start,
|
||||
start + replacementText!!
|
||||
.length,
|
||||
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
)
|
||||
|
||||
start = spannable.indexOf(placeholder, start + replacementText.length)
|
||||
}
|
||||
messageStringInternal = spannable
|
||||
@ -166,7 +165,6 @@ class MessageUtils(val context: Context) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return messageStringInternal
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user