add empty screen message

This commit is contained in:
Konrad Pozniak 2019-12-30 21:01:38 +01:00
commit b66faab71c
3 changed files with 9 additions and 2 deletions

View file

@ -37,7 +37,7 @@ class BackgroundMessageView @JvmOverloads constructor(
* If [clickListener] is `null` then the button will be hidden.
*/
fun setup(@DrawableRes imageRes: Int, @StringRes messageRes: Int,
clickListener: ((v: View) -> Unit)?) {
clickListener: ((v: View) -> Unit)? = null) {
messageTextView.setText(messageRes)
messageTextView.setCompoundDrawablesWithIntrinsicBounds(0, imageRes, 0, 0)
button.setOnClickListener(clickListener)