android - How to add SurfaceView displaying camera preview with opacity -


i want add surfaceview displaying camera preview layout. should semi-transparent (alpha 0.5). add view addview() method. ho that. tried animation seems not works camera.

my surfave view looks that:

public class showcamera extends surfaceview implements surfaceholder.callback {     private surfaceholder holdme;    private camera thecamera;     public showcamera(context context,camera camera) {       super(context);       thecamera = camera;       holdme = getholder();       holdme.addcallback(this);    }     @override    public void surfacechanged(surfaceholder arg0, int arg1, int arg2, int arg3) {    }     @override    public void surfacecreated(surfaceholder holder) {       try   {          thecamera.setpreviewdisplay(holder);          thecamera.startpreview();        } catch (ioexception e) {       }    }     @override    public void surfacedestroyed(surfaceholder arg0) {    }  } 

my minapi = 8.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -