Is there a way I can embed a loading progress indicator in a ListActivity or Fragment the same way that I can call setListShown() in a ListFragment? I can use a loading dialog but I would prefer to keep things consistent as I am already using setListShown() in other ListFragments.
Thanks.
I accomplished this by writing a wrapper for the fragment class similar to ListFragment.
I use this for fragments that I’m populating asynchronously. To use it, do not override onCreateView(). Instead, inflate your view in onStart() and call setView() with it. The fragment will start with a loading spinner. Call setContentShow(true) after you are done populating your view to remove the loading animation and show your content.