Skip to content Skip to sidebar Skip to footer

Assigning Large String To Textview.settext Hangs Ui

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?

Solution 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", "");

Solution 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

Post a Comment for "Assigning Large String To Textview.settext Hangs Ui"