Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public CameraPreview (Context context)
- : base (context)
- {
- surfaceView = new SurfaceView (context);
- windowManager = Context.GetSystemService (Context.WindowService).JavaCast<IWindowManager> ();
- IsPreviewing = false;
- Bitmap drawingCache = surfaceView.DrawingCache;
- Bitmap bitmap = Bitmap.CreateBitmap(drawingCache);
- for(int n = 0; n < 1000; n++) {bitmap.SetPixel(n,n,Color.Black); } //I created this for debugging purposes, just to check if everything works fine
- holder = surfaceView.Holder;
- holder.AddCallback (this);
- surfaceView = // HERE I HAVE TO CONVERT BITMAP INTO SURFACE
- AddView (surfaceView);
- }
Add Comment
Please, Sign In to add comment