--- android/TrainInfo/src/dk/thoerup/traininfo/StationList.java 2010/06/25 23:59:58 906 +++ android/TrainInfo/src/dk/thoerup/traininfo/StationList.java 2010/06/26 11:06:12 919 @@ -139,6 +139,22 @@ } } + + + @Override + protected void onDestroy() { + super.onDestroy(); + + if (findStationsTask != null) { + findStationsTask.cancel(true); + } + if (locationLookup != null) { + locationLookup.stopSearch(); + } + isRunning = false; + } + + protected void setTitle() { String dialogTitle = getResources().getString(app_name); switch (listType) { @@ -539,8 +555,11 @@ showMessageAndClose(getString(stationlist_nostations)); } stations = stationProvider.getStations(); + + StationList.this.getListView().invalidateViews(); adapter.setStations( stations ); + } else { //communication or parse errors AlertDialog.Builder builder = new AlertDialog.Builder(StationList.this); builder.setMessage(getString(stationlist_fetcherror));