19 |
import dk.thoerup.traininfo.provider.DepartureProvider; |
import dk.thoerup.traininfo.provider.DepartureProvider; |
20 |
import dk.thoerup.traininfo.provider.ProviderFactory; |
import dk.thoerup.traininfo.provider.ProviderFactory; |
21 |
import dk.thoerup.traininfo.util.MessageBox; |
import dk.thoerup.traininfo.util.MessageBox; |
22 |
|
import static dk.thoerup.traininfo.R.string.*; |
23 |
|
|
24 |
public class DepartureList extends ListActivity { |
public class DepartureList extends ListActivity { |
25 |
|
|
129 |
switch (id) { |
switch (id) { |
130 |
case DLG_PROGRESS: |
case DLG_PROGRESS: |
131 |
ProgressDialog dlg = new ProgressDialog(this); |
ProgressDialog dlg = new ProgressDialog(this); |
132 |
dlg.setMessage("Fetch departure data"); |
dlg.setMessage( getString(departurelist_fetchdata) ); |
133 |
dlg.setCancelable(true); |
dlg.setCancelable(true); |
134 |
return dlg; |
return dlg; |
135 |
default: |
default: |
187 |
AlertDialog.Builder builder = new AlertDialog.Builder(DepartureList.this); |
AlertDialog.Builder builder = new AlertDialog.Builder(DepartureList.this); |
188 |
builder.setMessage("Error finding departures"); |
builder.setMessage("Error finding departures"); |
189 |
builder.setCancelable(true); |
builder.setCancelable(true); |
190 |
builder.setPositiveButton("Retry", new DialogInterface.OnClickListener() { |
builder.setPositiveButton(getString(generic_retry), new DialogInterface.OnClickListener() { |
191 |
public void onClick(DialogInterface dialog, int id) { |
public void onClick(DialogInterface dialog, int id) { |
192 |
dialog.dismiss(); |
dialog.dismiss(); |
193 |
startDepartureFetcher(); |
startDepartureFetcher(); |
194 |
|
|
195 |
} |
} |
196 |
}); |
}); |
197 |
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { |
builder.setNegativeButton(getString(generic_cancel), new DialogInterface.OnClickListener() { |
198 |
public void onClick(DialogInterface dialog, int id) { |
public void onClick(DialogInterface dialog, int id) { |
199 |
dialog.dismiss(); |
dialog.dismiss(); |
200 |
} |
} |