Building a Camera App in Mono for Android: Listing 1
The project UI.
- By Greg Shackles
- 08/14/2012
using System;
using Android.App;
using Android.Content;
using Android.Graphics;
using Android.OS;
using Android.Provider;
using Android.Widget;
namespace CameraDemo
{
[Activity(Label = "Camera Demo", MainLauncher = true)]
public class CameraActivity : Activity
{
private const int TakePictureRequestCode = 42;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.Main);
var takePictureButton = FindViewById<Button>(Resource.Id.TakePicture);
takePictureButton.Click += takePicture;
}
}
}