--- android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2011/07/09 07:20:57 1567 +++ android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2011/07/09 09:45:40 1572 @@ -199,6 +199,19 @@ @Override public void onClick(View v) { + + StationProvider sp = ProviderFactory.getStationProvider(); + + if (sp instanceof OfflineStationProvider ) { + OfflineStationProvider osp = (OfflineStationProvider) sp; + + if (! osp.hasStations()) { + stationLoader = new StationLoader(osp); + stationLoader.execute( (Void)null); + return; + } + } + Intent intent = new Intent(WelcomeScreen.this, StationList.class); intent.putExtra("type", launchType); WelcomeScreen.this.startActivity(intent); @@ -237,7 +250,7 @@ dlg = new ProgressDialog(WelcomeScreen.this); dlg.setMessage( getText(R.string.welcome_downloadingstations) ); - dlg.setCancelable(true); + dlg.setCancelable(false); dlg.show(); }