android.view.View.draw C# (CSharp) Method

draw() public method

public draw ( android arg0 ) : void
arg0 android
return void
        public virtual void draw(android.graphics.Canvas arg0)
        {
            global::MonoJavaBridge.JavaBridge.CallVoidMethod(this, global::android.view.View.staticClass, "draw", "(Landroid/graphics/Canvas;)V", ref global::android.view.View._m19, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
        }

Usage Example

        public void createVrToast(View toastView)
        {
            // Find how big the toast wants to be.
            toastView.measure(0, 0);
            toastView.layout(0, 0, toastView.getMeasuredWidth(),
                    toastView.getMeasuredHeight());

            Log.v(TAG,
                    "toast size:" + toastView.getWidth() + "x"
                            + toastView.getHeight());
            toastTexture.setDefaultBufferSize(toastView.getWidth(),
                    toastView.getHeight());
            try
            {
                Canvas canvas = toastSurface.lockCanvas(null);
                toastView.draw(canvas);
                toastSurface.unlockCanvasAndPost(canvas);
            }
            catch
            {
                Log.e(TAG, "lockCanvas threw exception");
            }

            nativePopup(appPtr, toastView.getWidth(), toastView.getHeight(), 7.0f);
        }
View