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

android.text.SpannedString cannot be cast to java.lang.String #8

Open
ganghuaChen opened this issue Jun 17, 2015 · 5 comments
Open

Comments

@ganghuaChen
Copy link

Process: com.zhongduomei.rrmj.society, PID: 23335
java.lang.ClassCastException: android.text.SpannedString cannot be cast to java.lang.String
at me.biubiubiu.justifytext.library.JustifyTextView.onDraw(JustifyTextView.java:34)
at android.view.View.draw(View.java:14493)
at android.view.View.getDisplayList(View.java:13390)

@theangi
Copy link

theangi commented Sep 12, 2015

I'm having the same issue, when setting the text with Html.fromHtml() which returns a Spannable object

@malachid
Copy link

In the onDraw method, changing

String text = getText();

to

String text = getText().toString();

seems to fix it.

@Magenta94
Copy link

Same problem, please release a fixed version.

@ointeractive-depot
Copy link

Don't believe that the problem don't fixed yet(

@Nordis1
Copy link

Nordis1 commented May 22, 2021

Learn thathttps://www.infopalacess.com/2019/04/justify-text-in-android-studio.html
There is helpful info.

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

5 participants