Make image in BackgroundMessageView adapt to the height, fix #1618 (#1649)

* Make image in BackgroundMessageView adapt to the height, fix #1618

* Hide filters panel when showing status view in notifications
This commit is contained in:
Ivan Kupalov 2020-02-25 19:57:28 +01:00 committed by GitHub
commit 656644b7cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 7 deletions

View file

@ -39,7 +39,7 @@ class BackgroundMessageView @JvmOverloads constructor(
fun setup(@DrawableRes imageRes: Int, @StringRes messageRes: Int,
clickListener: ((v: View) -> Unit)? = null) {
messageTextView.setText(messageRes)
messageTextView.setCompoundDrawablesWithIntrinsicBounds(0, imageRes, 0, 0)
imageView.setImageResource(imageRes)
button.setOnClickListener(clickListener)
button.visible(clickListener != null)
}