large-screen-codelabs icon indicating copy to clipboard operation
large-screen-codelabs copied to clipboard

Change the background color of the Advanced Stylus low latency to white background

Open sontrang91 opened this issue 1 year ago • 1 comments

Hi there a way to change the background color of FastRenderer to be white instead of black. I am able to change to white only after the first drawing event happen like this in FastRenderer#114

    // Clear the screen with white
    GLES20.glClearColor(1.0f, 1.0f, 1.0f, 1.0f)

However the app always initialize with black background. Also is it possible to overlay the drawing on top of a webview?

sontrang91 avatar Mar 26 '24 15:03 sontrang91

@sontrang91 You can change the MySurfaceView background by the normal way like:

        setZOrderOnTop(true);
        setFocusable(true);
        mSurfaceHolder.setFormat(PixelFormat.TRANSLUCENT);

And, you just set your parent view's background to Color.WHITE, then maybe your can see your bg with white color. Also you should note that surfaceview will at the top of your view tree.

indieexplore avatar Apr 02 '24 06:04 indieexplore