diff --git a/app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt b/app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt index de0027c8f..5434744db 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt @@ -81,8 +81,13 @@ class ContentTextView : AppCompatTextView { initOffsetHeight() } - override fun setText(text: CharSequence?, type: BufferType?) { - super.setText(text, type) + override fun onTextChanged( + text: CharSequence?, + start: Int, + lengthBefore: Int, + lengthAfter: Int + ) { + super.onTextChanged(text, start, lengthBefore, lengthAfter) initOffsetHeight() }