コード例 #1
0
 public override void OnViewCreated(View view, Bundle savedInstanceState)
 {
     mTextureView = (AutoFitTextureView)view.FindViewById(Resource.Id.texture);
     mTextureView.SurfaceTextureListener = mSurfaceTextureListener;
     view.FindViewById(Resource.Id.picture).SetOnClickListener(this);
     view.FindViewById(Resource.Id.info).SetOnClickListener(this);
 }
コード例 #2
0
 public override void OnViewCreated(View view, Bundle savedInstanceState)
 {
     mTextureView = (AutoFitTextureView)view.FindViewById(Resource.Id.texture);
     view.FindViewById(Resource.Id.picture).SetOnClickListener(this);
     view.FindViewById(Resource.Id.info).SetOnClickListener(this);
     SingletonConnector.cameraActivity.SetSeekbar();
 }
コード例 #3
0
        public DroidCameraPreview(Context context, CameraOptions option) : base(context)
        {
            CameraOption = option;

            var path       = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
            var nativePath = Context.GetExternalFilesDir(Android.OS.Environment.DirectoryDocuments);

            // Camera Setup
            File                      = new Java.IO.File(path, "pic.jpg");
            CaptureCallback           = new CameraCaptureListener(this);
            mOnImageAvailableListener = new ImageAvailableListener(this);
            mStateCallback            = new CameraStateListener(this);
            mSurfaceTextureListener   = new Camera2BasicSurfaceTextureListener(this);

            mTextureView = new Camera2Basic.AutoFitTextureView(context);
            AddView(mTextureView);

            // fill ORIENTATIONS list
            ORIENTATIONS.Append((int)SurfaceOrientation.Rotation0, 90);
            ORIENTATIONS.Append((int)SurfaceOrientation.Rotation90, 0);
            ORIENTATIONS.Append((int)SurfaceOrientation.Rotation180, 270);
            ORIENTATIONS.Append((int)SurfaceOrientation.Rotation270, 180);

            State = CameraState.Stopped;
        }
コード例 #4
0
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            mTextureView = (AutoFitTextureView)view.FindViewById(Resource.Id.texture);

            // Set up 2 listeners (code is below)
            view.FindViewById(Resource.Id.picture).SetOnClickListener(this);
            view.FindViewById(Resource.Id.info).SetOnClickListener(this);
        }
コード例 #5
0
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            _textureView = (AutoFitTextureView)view.FindViewById(Resource.Id.texture);

            _btnStartStop = view.FindViewById <Button>(Resource.Id.picture);
            _btnStartStop.SetOnClickListener(this);

            view.FindViewById(Resource.Id.info).SetOnClickListener(this);
        }
コード例 #6
0
        public DroidCameraPreview(Context context, CameraOptions option) : base(context)
        {
            CameraOption = option;

            // Camera Setup
            File                      = new Java.IO.File(Context.GetExternalFilesDir(null), "pic.jpg");
            CaptureCallback           = new CameraCaptureListener(this);
            mOnImageAvailableListener = new ImageAvailableListener(this, File);
            mStateCallback            = new CameraStateListener(this);
            mSurfaceTextureListener   = new Camera2BasicSurfaceTextureListener(this);

            mTextureView = new Camera2Basic.AutoFitTextureView(context);
            AddView(mTextureView);

            // fill ORIENTATIONS list
            ORIENTATIONS.Append((int)SurfaceOrientation.Rotation0, 90);
            ORIENTATIONS.Append((int)SurfaceOrientation.Rotation90, 0);
            ORIENTATIONS.Append((int)SurfaceOrientation.Rotation180, 270);
            ORIENTATIONS.Append((int)SurfaceOrientation.Rotation270, 180);
        }
コード例 #7
0
 public override void OnViewCreated(View view, Bundle savedInstanceState)
 {
     _textureView = (AutoFitTextureView)view.FindViewById(Resource.Id.texture);
 }