mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Fixed broken avatar generation for notifications & shortcuts
This commit is contained in:
parent
b3da6ed347
commit
d5ca4c29d3
1 changed files with 8 additions and 2 deletions
|
|
@ -45,11 +45,17 @@ class AvatarGenerator(private val context: Context) {
|
|||
init {
|
||||
val textTypedValue = TypedValue()
|
||||
context.theme.resolveAttribute(R.attr.color_avatar_text, textTypedValue, true)
|
||||
textColor = textTypedValue.data
|
||||
// This will fail for notifications
|
||||
if (textTypedValue.data != 0) {
|
||||
textColor = textTypedValue.data
|
||||
}
|
||||
|
||||
val backgroundTypedValue = TypedValue()
|
||||
context.theme.resolveAttribute(R.attr.color_avatar_background, backgroundTypedValue, true)
|
||||
backgroundColor = backgroundTypedValue.data
|
||||
// This will fail for notifications
|
||||
if (backgroundTypedValue.data != 0) {
|
||||
backgroundColor = backgroundTypedValue.data
|
||||
}
|
||||
}
|
||||
|
||||
fun setTextSize(size: Float) = apply {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue