protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Hide the window title and go fullscreen.
            RequestWindowFeature(WindowFeatures.NoTitle);
            Window.AddFlags(WindowManagerFlags.Fullscreen);

            // Create our Preview view and set it as the content of our activity.
            mPreview = new Preview(this);
            SetContentView(mPreview);

            // Find the total number of cameras available
            numberOfCameras = Camera.NumberOfCameras;

            // Find the ID of the default camera
            Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
            for (int i = 0; i < numberOfCameras; i++)
            {
                Camera.GetCameraInfo(i, cameraInfo);
                if (cameraInfo.Facing == CameraFacing.Back)
                {
                    defaultCameraId = i;
                }
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Hide the window title.
            RequestWindowFeature(WindowFeatures.NoTitle);

            // Create our Preview view and set it as the content of our activity.
            preview = new Preview(this);
            SetContentView(preview);
        }
Пример #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);

            // Hide the window title.
            RequestWindowFeature (WindowFeatures.NoTitle);

            // Create our Preview view and set it as the content of our activity.
            preview = new Preview (this);
            SetContentView (preview);
        }
Пример #4
0
		protected override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);

			// Hide the window title and go fullscreen.
			RequestWindowFeature (WindowFeatures.NoTitle);
			Window.AddFlags (WindowManagerFlags.Fullscreen);

			// Create our Preview view and set it as the content of our activity.
			mPreview = new Preview (this);
			SetContentView (mPreview);

			// Find the total number of cameras available
			numberOfCameras = Camera.NumberOfCameras;

			// Find the ID of the default camera
			Camera.CameraInfo cameraInfo = new Camera.CameraInfo ();
			for (int i = 0; i < numberOfCameras; i++) {
				Camera.GetCameraInfo (i, cameraInfo);
				if (cameraInfo.Facing == CameraFacing.Back) {
					defaultCameraId = i;
				}
			}
		}