1 |
package dk.thoerup.traininfo; |
2 |
|
3 |
import android.app.ListActivity; |
4 |
import android.content.Intent; |
5 |
import android.os.Bundle; |
6 |
import android.widget.TextView; |
7 |
|
8 |
public class TimetableList extends ListActivity { |
9 |
|
10 |
DepartureBean departure; |
11 |
|
12 |
@Override |
13 |
protected void onCreate(Bundle savedInstanceState) { |
14 |
super.onCreate(savedInstanceState); |
15 |
setContentView(R.layout.timetablelist); |
16 |
|
17 |
Intent launchedBy = getIntent(); |
18 |
departure = (DepartureBean) launchedBy.getSerializableExtra("departure"); |
19 |
|
20 |
((TextView)findViewById(R.id.Train)).setText(departure.getTrainNumber()); |
21 |
((TextView)findViewById(R.id.Status)).setText(departure.getStatus()); |
22 |
((TextView)findViewById(R.id.Note)).setText(departure.getNote()); |
23 |
((TextView)findViewById(R.id.Updated)).setText(departure.getLastUpdateString()); |
24 |
} |
25 |
|
26 |
/* case DLG_DETAILS: |
27 |
DepartureBean currentDeparture = departures.get(selectedItemId); |
28 |
((TextView)dialog.findViewById(R.id.Time)).setText(currentDeparture.getTime()); |
29 |
((TextView)dialog.findViewById(R.id.Train)).setText(currentDeparture.getTrainNumber()); |
30 |
((TextView)dialog.findViewById(R.id.Destination)).setText( currentDeparture.getDestination()); |
31 |
((TextView)dialog.findViewById(R.id.Origin)).setText(currentDeparture.getOrigin()); |
32 |
((TextView)dialog.findViewById(R.id.Location)).setText(currentDeparture.getLocation()); |
33 |
((TextView)dialog.findViewById(R.id.Updated)).setText(currentDeparture.getLastUpdateString()); |
34 |
((TextView)dialog.findViewById(R.id.Status)).setText(currentDeparture.getStatus()); |
35 |
((TextView)dialog.findViewById(R.id.Note)).setText(currentDeparture.getNote()); |
36 |
detailsDialog = dialog; |
37 |
break; |
38 |
|
39 |
*/ |
40 |
} |