super.onCreate(icicle);
// Use a custom layout file
setContentView(R.layout.list_8);
// Tell the list view which view to display when the list is empty
getListView().setEmptyView(findViewById(R.id.empty));
// Set up our adapter
mAdapter = new PhotoAdapter(this);
setListAdapter(mAdapter);
// Wire up the clear button to remove all photos
Button clear = (Button) findViewById(R.id.clear);
clear.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
mAdapter.clearPhotos();
} });
// Wire up the add button to add a new photo
Button add = (Button) findViewById(R.id.add);
add.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
mAdapter.addPhotos();
} });