Spinner / dialog download fragment in Honeycomb

When loading data into my fragments, I would like to have an undefined counter in the middle of the fragment (example in the figure below) to show the user that the content is loading on this particular panel.

What is the best way to do this at Honeycomb?

I really do not want to use the spinner in the action bar, it does not immediately become apparent when the data is loaded. In addition, I do not need an indefinite dialogue of progress, because it appears in the center of the entire application, and also does not allow the user to do anything even before he is fired. Notabene FragmentDialogs also do this.

Am I going to hack using a special FrameLayout to get the desired effect for each panel?

honeycomb screenshot

+7
source share
2 answers

If you are using ListFragment , you can call setListShown(false) to display a progress bar until you call setListShown(true) . You can call them in Loader fragment callback methods to display an indicator while the list is loading.

+18
source

I think the best way to achieve this is to use ViewSwitcher. Then, if you use the bootloader, you can simply switch between views (download view and content view) after the download is complete.

+3
source

All Articles