protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Use a custom layout file SetContentView(Resource.Layout.list_8); // Tell the list view which view to display when the list is empty ListView.EmptyView = FindViewById(Resource.Id.empty); // Set up our adapter mAdapter = new PhotoAdapter(this); ListAdapter = mAdapter; // Wire up the clear button to remove all photos Button clear = FindViewById <Button> (Resource.Id.clear); clear.Click += delegate { mAdapter.ClearPhotos(); }; // Wire up the add button to add a new photo Button addPhotos = FindViewById <Button>(Resource.Id.add); addPhotos.Click += delegate { mAdapter.AddPhotos(); }; }
protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); // Use a custom layout file SetContentView (Resource.Layout.list_8); // Tell the list view which view to display when the list is empty ListView.EmptyView = FindViewById (Resource.Id.empty); // Set up our adapter mAdapter = new PhotoAdapter (this); ListAdapter = mAdapter; // Wire up the clear button to remove all photos Button clear = FindViewById <Button> (Resource.Id.clear); clear.Click += delegate { mAdapter.ClearPhotos (); }; // Wire up the add button to add a new photo Button addPhotos = FindViewById <Button>(Resource.Id.add); addPhotos.Click += delegate { mAdapter.AddPhotos (); }; }