Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setBackgroundColor() don`t work #46

Closed
maxiannunziata opened this issue Jan 14, 2023 · 3 comments
Closed

setBackgroundColor() don`t work #46

maxiannunziata opened this issue Jan 14, 2023 · 3 comments

Comments

@maxiannunziata
Copy link

maxiannunziata commented Jan 14, 2023

Hi,

I need to put a video view on the bottom of a webview.

When I put:
mXWalkView.setBackgroundColor(0x00000000);
The background don't turn in transparent mode, always the background is white.

When I put:

mXWalkView.setBackgroundColor(Color.RED);
Or any other color, works correctly. but the Color.TRANSPARENT don't work.

any suggestion?

@maxiannunziata
Copy link
Author

I found this:


 @Override
  public final void onXWalkInitCompleted() {

    setContentView(R.layout.xwview_transparent_layout);
    StringBuffer mess = new StringBuffer();
    mess.append("Test Purpose: \n\n")
        .append(
            "Check XWalkView's transparent feature whether display the view under the webview.\n\n")
        .append("Expected Result:\n\n")
        .append("Test passes if you can see button view & blue imageview");
    new AlertDialog.Builder(this)
        .setTitle("Info")
        .setMessage(mess.toString())
        .setPositiveButton("confirm", null)
        .show();
    mXWalkView = (XWalkView) findViewById(R.id.xwalkview_transparent);
    mXWalkView.setZOrderOnTop(true);
    mXWalkView.setBackgroundColor(0);
    mXWalkView.load("http://www.baidu.com/", null);
  }

But the setZOrderOnTop() function doesn't exist in mXWalkView class.

@ks32
Copy link
Owner

ks32 commented Jan 19, 2023

yes it will not work. You can set background color from html/css in xwalkview.

@ks32 ks32 closed this as completed Jan 19, 2023
@maxiannunziata
Copy link
Author

maxiannunziata commented Jan 21, 2023

@ks32 I tried with set transparent in HTML/CSS but the SurfaceView inside xwalkview is white and the exoplayer above the xwalkview don't show.

Can you add the setZOrderOnTop() class in the mXWalkView?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants