I've just realised it's the method HTML.fromHTML() that's causing the delay. Removing that and just calling setText(myText) renders it instantly.
Problem is, the content is marked up. So I suppose I could display it in a webview instead, I'll see if that's any quicker. On Dec 14, 1:23 pm, TreKing <treking...@gmail.com> wrote: > On Wed, Dec 14, 2011 at 6:07 AM, Neilz <neilhorn...@gmail.com> wrote: > > However the text for some of the items is very long, and it's taking a > > couple of seconds to populate the view. > > A few seconds for text seems way long. You may want to optimize that, or > post how you're doing that part. > > I'd like to show a progress indicator until the view gets displayed, but > > > I'm not sure if there's such as listener or callback to tell me when the > > view has completely displayed? > > If just displaying the Text is taking that long, then a progress dialog is > not going to do you much good as the displaying happens on the GUI thread, > which you would be blocking, preventing the progress dialog from animating. > > An idea: If you can't optimize out the display, look at reducing how much > you set on the TextView initially. Reduce the size of the string to start > with then append more and more to it via an AsyncTask / Handler or > something. > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en