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

换行不起作用,全部都显示一行。 #4

Open
fengfengfeng1234 opened this issue Feb 19, 2019 · 0 comments
Open

换行不起作用,全部都显示一行。 #4

fengfengfeng1234 opened this issue Feb 19, 2019 · 0 comments

Comments

@fengfengfeng1234
Copy link

fengfengfeng1234 commented Feb 19, 2019

因为 Html.fromHtml 对\n 无效。
原:
return Html.fromHtml(sourceString, null, new HtmlTagHandler());
改为
return Html.fromHtml(sourceString.replace("\n","<br />"), null, new HtmlTagHandler());

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