mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
ContactsController: tint "public conversation" button
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
5ec18780ff
commit
54d1ac9de7
@ -631,12 +631,7 @@ class ContactsController(args: Bundle) :
|
||||
ResourcesCompat.getColor(resources!!, R.color.colorBackgroundDarker, null),
|
||||
PorterDuff.Mode.SRC_IN
|
||||
)
|
||||
binding.conversationPrivacyToggle.publicCallLink
|
||||
.background
|
||||
.setColorFilter(
|
||||
ResourcesCompat.getColor(resources!!, R.color.colorPrimary, null),
|
||||
PorterDuff.Mode.SRC_IN
|
||||
)
|
||||
viewThemeUtils.colorImageViewButton(binding.conversationPrivacyToggle.publicCallLink)
|
||||
disengageProgressBar()
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ package com.nextcloud.talk.ui.theme
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.content.res.Configuration
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
import javax.inject.Inject
|
||||
@ -48,7 +49,15 @@ class ViewThemeUtils @Inject constructor(val theme: ServerTheme) {
|
||||
fab.imageTintList = ColorStateList.valueOf(theme.colorText)
|
||||
}
|
||||
|
||||
fun colorTextView(titleTextView: TextView) {
|
||||
titleTextView.setTextColor(getElementColor(titleTextView.context))
|
||||
fun colorTextView(textView: TextView) {
|
||||
textView.setTextColor(getElementColor(textView.context))
|
||||
}
|
||||
|
||||
/**
|
||||
* Colors the background as element color and the foreground as text color.
|
||||
*/
|
||||
fun colorImageViewButton(imageView: ImageView) {
|
||||
imageView.imageTintList = ColorStateList.valueOf(theme.colorText)
|
||||
imageView.backgroundTintList = ColorStateList.valueOf(getElementColor(imageView.context))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user