问题
I'm trying to show very large text (of length 850879) in textview, unfortunately when I assign text to textview, UI hangs for 8-15 seconds! How do we fix this issue? any idea?
回答1:
Use Webview....instead of textview. Textview is not design to load large text.
WebView webView;
String html;
webView.loadDataWithBaseURL("", html, "text/html", "UTF-8", "");
回答2:
Can you spilt the text in small chunks and provide it to a list view... That way ui will not be blocked for what's not visible
来源:https://stackoverflow.com/questions/22671025/assigning-large-string-to-textview-settext-hangs-ui