Example usage for android.view SurfaceView getHeight

List of usage examples for android.view SurfaceView getHeight

Introduction

In this page you can find the example usage for android.view SurfaceView getHeight.

Prototype

@ViewDebug.ExportedProperty(category = "layout")
public final int getHeight() 

Source Link

Document

Return the height of your view.

Usage

From source file:Main.java

public static synchronized void cleansurfaceview(SurfaceHolder postureholder, SurfaceView posturesurface) {
    Canvas canvas = postureholder
            .lockCanvas(new Rect(0, 0, posturesurface.getWidth(), posturesurface.getHeight()));
    canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);
    postureholder.unlockCanvasAndPost(canvas);
    Canvas canvasa = postureholder
            .lockCanvas(new Rect(0, 0, posturesurface.getWidth(), posturesurface.getHeight()));
    canvasa.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);
    postureholder.unlockCanvasAndPost(canvasa);
}