SurfaceView setZOrderMediaOverlay - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for SurfaceView setZOrderMediaOverlay method.

This code example shows how to use the following methods:setEGLConfigChooser, setEGLContextClientVersion, setRenderer, getHolder, setZOrderMediaOverlay
        this.mainInterface = mainInterface;
    } 
 
    protected void onCreate(GLSurfaceView renderView) {
        mGLView = renderView;
        mGLView.setEGLContextClientVersion(2);
        mGLView.setEGLConfigChooser(8, 8, 8, 8, 16, 0);
        mGLView.setRenderer(new OpenGLRenderer(mainInterface));
        mGLView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
        mGLView.setZOrderMediaOverlay(true);
 
        log.log(TAG, "Created.");
    } 
 
    protected void onResume() { 
        mGLView.onResume();
    } 
 
    protected void onPause() { 
        mGLView.onPause();
6
CodeRank
This code example shows how to use the following methods:setRenderer, setZOrderMediaOverlay, setLayoutParams, setOnTouchListener
     */ 
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
 
        glSurface = new GLSurfaceView(this);
        final RenderGL render = new RenderGL(this);
        glSurface.setRenderer(render);
        glSurface.setOnTouchListener(render);
 
 
        ////////////////////////////////// 
        int camWidth = 320;
        int camHeight = 240;
        ////////////////////////////////// 
        FrameLayout frame = new FrameLayout(this);
        mPreview = new NativePreviewer(getApplication(), camWidth, camHeight);
        LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
        params.height = getWindowManager().getDefaultDisplay().getHeight();
        params.width = (int)(params.height * 4.0 / 2.88);

6
CodeRank
This code example shows how to use the following methods:setEGLContextClientVersion, setRenderer, setZOrderMediaOverlay
	 */ 
	private void initOpenGLRenderer() { 
		/* 
		 * Get a GL-context from the system. 
		 */ 
		mGLSurfaceView = new GLSurfaceView(this);
		if (detectOpenGLES20()) { 
			/* 
			 * Tell the surface view we want to create an OpenGL ES 
			 * 2.0-compatible context, and set an OpenGL ES 2.0-compatible 
			 * renderer. 
			 */ 
			mGLSurfaceView.setEGLContextClientVersion(2);
			Vector2di cameraResolution = mARController.getCameraResolution();
			mRenderer = new GLES20CameraImageRenderer(this, cameraResolution.getX(), cameraResolution.getY());
		} else { 
			throw new RuntimeException("OpenGL ES 2.0 must be supported!");
		} 
		/* 
		 * Link the different elements of this Activity 

6
CodeRank
This code example shows how to use the following methods:getHolder, setZOrderMediaOverlay, setOnClickListener
 
        Log.i(kTAG, "Init()");
 
        mActivity = activity;
        //InitRenderer(); 
        mSurfaceView = new SurfaceView(activity);
        mSurfaceHolder = mSurfaceView.getHolder();
        mSurfaceHolder.addCallback(this);
        mSurfaceView.setZOrderMediaOverlay(true);
        mSurfaceView.setOnClickListener(this);
 
        assetMgr = activity.getAssets();
        SetAppDirectory(activity.getPackageName(), assetMgr);        
	     
        activity.addContentView(mSurfaceView, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
 
        mEFI = SelectImplementation();
         
        //RendererSetSurface(mSurfaceHolder.getSurface()); 
 
5
CodeRank

Related SurfaceView setZOrderMediaOverlay Questions & Answers:

setZOrderMediaOverlay Method Overview
Control whether the surface view's surface is placed on top of another regular surface view in the window (but still behind the window itself).
See Code Examples for other Android SurfaceView Methods: