@@ -139,7 +139,8 @@ public void onItemClick(AdapterView<?> parent, View view,
139
139
@ Override
140
140
public boolean onItemLongClick (AdapterView <?> parent , View view ,
141
141
int position , long id ) {
142
- return onListItemLongClick ((ListView ) parent , view , position , id );
142
+ return onListItemLongClick ((ListView ) parent , view , position ,
143
+ id );
143
144
}
144
145
});
145
146
progressBar = (ProgressBar ) view .findViewById (id .pb_loading );
@@ -198,7 +199,8 @@ private void refresh(final Bundle args) {
198
199
if (!isUsable ())
199
200
return ;
200
201
201
- getSherlockActivity ().setSupportProgressBarIndeterminateVisibility (true );
202
+ getSherlockActivity ()
203
+ .setSupportProgressBarIndeterminateVisibility (true );
202
204
getLoaderManager ().restartLoader (0 , args , this );
203
205
}
204
206
@@ -211,6 +213,11 @@ private void refresh(final Bundle args) {
211
213
protected abstract int getErrorMessage (Exception exception );
212
214
213
215
public void onLoadFinished (Loader <List <E >> loader , List <E > items ) {
216
+ if (!isUsable ())
217
+ return ;
218
+
219
+ getSherlockActivity ().setSupportProgressBarIndeterminateVisibility (
220
+ false );
214
221
Exception exception = getException (loader );
215
222
if (exception != null ) {
216
223
showError (exception , getErrorMessage (exception ));
@@ -221,8 +228,6 @@ public void onLoadFinished(Loader<List<E>> loader, List<E> items) {
221
228
this .items = items ;
222
229
getListAdapter ().getWrappedAdapter ().setItems (items .toArray ());
223
230
showList ();
224
-
225
- getSherlockActivity ().setSupportProgressBarIndeterminateVisibility (false );
226
231
}
227
232
228
233
/**
0 commit comments