Run your code through Traceview and see where the time is being taken (onDraw(), perhaps?). That may give you some clues as to where you can subclass whichever View you are using to find out when the long time starts/ends.
That being said: -- If the View in question is WebView or SurfaceView, this approach probably won't work (though you might be able to leverage onPageFinished() with WebView) -- I doubt you will be able to effectively use a progress indicator, as the progress indicator has to be drawn on the main application thread, and your long work is being done on the main application thread, so the progress indicator may well be frozen -- You may be better served focusing on how you can speed up the display (e.g., rather than loading a monster piece of text into a TextView in a ScrollView, bust it up by paragraphs and load each into a row of a ListView) On Wed, Dec 14, 2011 at 7:07 AM, Neilz <[email protected]> wrote: > Hi all. > > I have a list, where clicking an item displays a View. The view is > populated with text, and then made visible. However the text for some > of the items is very long, and it's taking a couple of seconds to > populate the view. > > 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? > > Any advice appreciated. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

