ReadMoreTextView
ReadMoreTextView copied to clipboard
View more not showing with delay
If we set text using textView.setText(someLongTextHere) immediately in onCreate - everything works fine. But if we do the same with a delay (2 sec f.x.) text gonna be shown, but show more not working.
requestLayout and invalidate do not help.
R.string.temp is a long string.
tv1.setText(getString(R.string.temp)) works fine, and viewmore gonna be shown.
But if we do it with a delay:
Handler().postDelayed({
tv1.setText(getString(R.string.temp))
tv1.requestLayout()
tv1.invalidate()
}, 2000)
viewmore not shown.
Seems like onGlobalLayoutLineEndIndex is the reason