Get icon width from xml resource
This commit is contained in:
parent
3fa03b2998
commit
9284859b8b
|
@ -335,10 +335,9 @@ class ThreadAdapter(
|
||||||
thread_message_scheduled_icon.beVisible()
|
thread_message_scheduled_icon.beVisible()
|
||||||
thread_message_scheduled_icon.applyColorFilter(contrastColor)
|
thread_message_scheduled_icon.applyColorFilter(contrastColor)
|
||||||
|
|
||||||
thread_message_scheduled_icon.onGlobalLayout {
|
val iconWidth = resources.getDimensionPixelSize(R.dimen.small_icon_size)
|
||||||
val rightPadding = padding + thread_message_scheduled_icon.measuredWidth
|
val rightPadding = padding + iconWidth
|
||||||
thread_message_body.setPadding(padding, padding, rightPadding, padding)
|
thread_message_body.setPadding(padding, padding, rightPadding, padding)
|
||||||
}
|
|
||||||
thread_message_body.typeface = Typeface.create(Typeface.DEFAULT, Typeface.ITALIC)
|
thread_message_body.typeface = Typeface.create(Typeface.DEFAULT, Typeface.ITALIC)
|
||||||
} else {
|
} else {
|
||||||
thread_message_scheduled_icon.beGone()
|
thread_message_scheduled_icon.beGone()
|
||||||
|
|
Loading…
Reference in New Issue