Move bubble rendering from onMeasure to onLayout.

This commit is contained in:
Alex Hart
2021-06-07 09:16:18 -03:00
parent 835d7f5ccb
commit 06aec0b7d7

View File

@@ -107,8 +107,8 @@ class ChatColorPreviewView @JvmOverloads constructor(
}
}
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
super.onLayout(changed, left, top, right, bottom)
if (chatColors != null) {
setChatColors(requireNotNull(chatColors))