Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/middleware/AsyncStopsSearcher.java
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | protected void onPreExecute() { | ||||
FragmentHelper fh = helperWR.get(); | FragmentHelper fh = helperWR.get(); | ||||
if (fh!=null) fh.toggleSpinner(true); | if (fh!=null) fh.toggleSpinner(true); | ||||
} | } | ||||
@Override | @Override | ||||
protected void onPostExecute(List<Stop> stops) { | protected void onPostExecute(List<Stop> stops) { | ||||
final FragmentHelper fh = helperWR.get(); | final FragmentHelper fh = helperWR.get(); | ||||
if (stops==null || fh==null || theQuery==null) { | if (stops==null || stops.size() == 0 || fh==null || theQuery==null) { | ||||
if (fh!=null) fh.toggleSpinner(false); | if (fh!=null) fh.toggleSpinner(false); | ||||
cancel(true); | cancel(true); | ||||
return; | return; | ||||
} | } | ||||
if(isCancelled()){ | if(isCancelled()){ | ||||
fh.toggleSpinner(false); | fh.toggleSpinner(false); | ||||
return; | return; | ||||
} | } | ||||
fh.createStopListFragment(stops, theQuery, true); | fh.createStopListFragment(stops, theQuery, true); | ||||
} | } | ||||
} | } |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register