1 |
package dk.thoerup.traininfo; |
2 |
|
3 |
import java.util.ArrayList; |
4 |
|
5 |
import android.app.ListActivity; |
6 |
import android.os.Bundle; |
7 |
import android.widget.ArrayAdapter; |
8 |
|
9 |
public class NotificationList extends ListActivity { |
10 |
|
11 |
public static final String EXTRA_NOTIFICATIONS = "notifications"; |
12 |
|
13 |
@SuppressWarnings("unchecked") |
14 |
@Override |
15 |
public void onCreate(Bundle savedInstanceState) { |
16 |
super.onCreate(savedInstanceState); |
17 |
setContentView( R.layout.notificationlist ); |
18 |
|
19 |
ArrayList<String> notifications = (ArrayList<String>) getIntent().getSerializableExtra(EXTRA_NOTIFICATIONS); |
20 |
ArrayAdapter<String> adaptor = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, notifications); |
21 |
|
22 |
setListAdapter(adaptor); |
23 |
} |
24 |
} |