220 |
pgDialog.dismiss(); |
pgDialog.dismiss(); |
221 |
|
|
222 |
if (success) { |
if (success) { |
223 |
|
DepartureList.this.getListView().setVisibility(View.GONE); //Experimental, inspired by http://osdir.com/ml/Android-Developers/2010-04/msg01198.html |
224 |
adapter.setDepartures(departures); |
adapter.setDepartures(departures); |
225 |
|
DepartureList.this.getListView().setVisibility(View.VISIBLE); |
226 |
|
|
227 |
if (departures.size() == 0) { |
if (departures.size() == 0) { |
228 |
MessageBox.showMessage(DepartureList.this, "No departures found"); |
MessageBox.showMessage(DepartureList.this, "No departures found", true); |
229 |
} |
} |
230 |
} else { // communication or parse error |
} else { // communication or parse error |
231 |
AlertDialog.Builder builder = new AlertDialog.Builder(DepartureList.this); |
AlertDialog.Builder builder = new AlertDialog.Builder(DepartureList.this); |
241 |
builder.setNegativeButton(getString(generic_cancel), new DialogInterface.OnClickListener() { |
builder.setNegativeButton(getString(generic_cancel), new DialogInterface.OnClickListener() { |
242 |
public void onClick(DialogInterface dialog, int id) { |
public void onClick(DialogInterface dialog, int id) { |
243 |
dialog.dismiss(); |
dialog.dismiss(); |
244 |
|
DepartureList.this.finish(); |
245 |
} |
} |
246 |
}); |
}); |
247 |
|
|