258 |
message.append( getString(stationlist_nolocation) ); |
message.append( getString(stationlist_nolocation) ); |
259 |
} |
} |
260 |
|
|
261 |
MessageBox.showMessage(this, message.toString()); |
MessageBox.showMessage(this, message.toString(), false); |
262 |
break; |
break; |
263 |
default: |
default: |
264 |
retval = super.onOptionsItemSelected(item); |
retval = super.onOptionsItemSelected(item); |
437 |
|
|
438 |
case NOPROVIDER: |
case NOPROVIDER: |
439 |
dismissDialogSafe(DLG_PROGRESS); |
dismissDialogSafe(DLG_PROGRESS); |
440 |
MessageBox.showMessage(StationList.this, getString(stationlist_nolocationprovider) ); |
MessageBox.showMessage(StationList.this, getString(stationlist_nolocationprovider), true ); |
441 |
|
//StationList.this.finish(); |
442 |
break; |
break; |
443 |
case LOCATIONFIXTIMEOUT: |
case LOCATIONFIXTIMEOUT: |
444 |
if (isRunning) { |
if (isRunning) { |
539 |
showMessageAndClose(getString(stationlist_nostations)); |
showMessageAndClose(getString(stationlist_nostations)); |
540 |
} |
} |
541 |
stations = stationProvider.getStations(); |
stations = stationProvider.getStations(); |
542 |
|
|
543 |
|
StationList.this.getListView().invalidateViews(); |
544 |
adapter.setStations( stations ); |
adapter.setStations( stations ); |
545 |
|
|
546 |
|
|
547 |
} else { //communication or parse errors |
} else { //communication or parse errors |
548 |
AlertDialog.Builder builder = new AlertDialog.Builder(StationList.this); |
AlertDialog.Builder builder = new AlertDialog.Builder(StationList.this); |
549 |
builder.setMessage(getString(stationlist_nearbyerror)); |
builder.setMessage(getString(stationlist_fetcherror)); |
550 |
builder.setCancelable(true); |
builder.setCancelable(true); |
551 |
builder.setPositiveButton(getString(generic_retry), new DialogInterface.OnClickListener() { |
builder.setPositiveButton(getString(generic_retry), new DialogInterface.OnClickListener() { |
552 |
public void onClick(DialogInterface dialog, int id) { |
public void onClick(DialogInterface dialog, int id) { |
586 |
builder.setNegativeButton(getString(generic_cancel), new DialogInterface.OnClickListener() { |
builder.setNegativeButton(getString(generic_cancel), new DialogInterface.OnClickListener() { |
587 |
public void onClick(DialogInterface dialog, int id) { |
public void onClick(DialogInterface dialog, int id) { |
588 |
dialog.dismiss(); |
dialog.dismiss(); |
589 |
|
StationList.this.finish(); |
590 |
} |
} |
591 |
}); |
}); |
592 |
|
|