ReadMoreTextView icon indicating copy to clipboard operation
ReadMoreTextView copied to clipboard

View more not showing with delay

Open TooLazyy opened this issue 7 years ago • 0 comments

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

TooLazyy avatar Jul 06 '18 12:07 TooLazyy