Request layout after text changes to ensure content is properly sized.

This commit is contained in:
Alex Hart
2022-10-19 13:43:36 -03:00
committed by Cody Henthorne
parent 39c1939470
commit 44f551acc5

View File

@@ -39,6 +39,10 @@ class TextStoryTextWatcher private constructor(private val textView: TextView) :
}
textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, DimensionUnit.DP.toPixels(expectedTextSize))
if (textView !is EditText) {
textView.requestLayout()
}
}
fun install(textView: TextView) {