10 |
import java.util.ArrayList; |
import java.util.ArrayList; |
11 |
import java.util.List; |
import java.util.List; |
12 |
|
|
|
import android.app.Activity; |
|
13 |
import android.app.AlertDialog; |
import android.app.AlertDialog; |
14 |
import android.app.Dialog; |
import android.app.Dialog; |
15 |
|
import android.app.ListActivity; |
16 |
import android.app.ProgressDialog; |
import android.app.ProgressDialog; |
17 |
import android.content.DialogInterface; |
import android.content.DialogInterface; |
18 |
import android.content.Intent; |
import android.content.Intent; |
19 |
import android.os.AsyncTask; |
import android.os.AsyncTask; |
20 |
import android.os.Bundle; |
import android.os.Bundle; |
21 |
import android.util.Log; |
import android.util.Log; |
|
import android.widget.ListView; |
|
22 |
import android.widget.TextView; |
import android.widget.TextView; |
23 |
import dk.thoerup.traininfo.provider.ProviderFactory; |
import dk.thoerup.traininfo.provider.ProviderFactory; |
24 |
import dk.thoerup.traininfo.provider.TimetableProvider; |
import dk.thoerup.traininfo.provider.TimetableProvider; |
25 |
import dk.thoerup.traininfo.util.MessageBox; |
import dk.thoerup.traininfo.util.MessageBox; |
26 |
|
|
27 |
public class TimetableList extends Activity { |
public class TimetableList extends ListActivity { |
28 |
|
|
29 |
private static final int DLG_PROGRESS = 8000; |
private static final int DLG_PROGRESS = 8000; |
30 |
DepartureBean departure; |
DepartureBean departure; |
42 |
|
|
43 |
provider = ProviderFactory.getTimetableProvider(); |
provider = ProviderFactory.getTimetableProvider(); |
44 |
|
|
45 |
adapter = new TimetableListAdapter(this); |
adapter = new TimetableListAdapter(this); |
46 |
|
setListAdapter(adapter); |
47 |
ListView lv = (ListView) findViewById(R.id.List); |
|
|
lv.setAdapter(adapter); |
|
48 |
|
|
49 |
|
|
50 |
Intent launchedBy = getIntent(); |
Intent launchedBy = getIntent(); |
65 |
} |
} |
66 |
} |
} |
67 |
|
|
68 |
|
|
69 |
@Override |
@Override |
70 |
public void onSaveInstanceState(Bundle outState) |
public void onSaveInstanceState(Bundle outState) |
71 |
{ |
{ |