What's the most efficient way to replace a certain layout with a loading progress bar (usually the indefinite spinner) while its waiting for a callback, and dismissing the spinner once the content has loaded? Ideally I've come across the following approach at my workplace:
Have a layout that goes something like this:
<Framelayout ...> <Framelayout ... android:id="@+id/loading_spinner"/> <!-- Actual layout goes here --> <LinearLayout ... android:id="@+id/actual_results_layout" /> </Framelayout>
And then go about manipulating the visibility of the loading spinner as and when the callbacks come around. Any better way to do this?
Submitted May 03, 2015 at 06:58PM by SunshineParty http://www.reddit.com/r/androiddev/comments/34ptt9/paradigm_for_loading_spinner/ Sponsser By Best Android Phone
No comments:
Post a Comment