Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View more not showing with delay #37

Open
TooLazyy opened this issue Jul 6, 2018 · 0 comments
Open

View more not showing with delay #37

TooLazyy opened this issue Jul 6, 2018 · 0 comments

Comments

@TooLazyy
Copy link

TooLazyy commented Jul 6, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant