Hello Hongbo,
thanks for your suggestion. Apparently, there are several limitations with the
default SurfaceView (stacking views is not possible/advised). I already tried
enabling ANIMATABLE_XWALK_VIEW ever since I came across the following article
earlier today:
https://github.com/crosswalk-project/crosswalk-website/wiki/Android-SurfaceView-vs-TextureView
setAlpha() now indeed works. However, setting the opacity is not what I’m
looking for. We need to have a transparent background color in order to use the
webview as an overlay. Neither setBackgroundColor(Color.TRANSPARENT),
setBackgroundDrawable(null) nor setBackgroundResource(0) has any effect, even
when XWalkView is using a TextureView.
Is there anything obvious I’m missing?
Thanks,
Florian
Am 07. Juli 2014 bei 16:44:00, Min, Hongbo ([email protected]) schrieb:
Florian,
You may have a try to enable animitable XWalkView, the setAlpha would work on
an animitable XWalkView. See
https://crosswalk-project.org/#wiki/Android-SurfaceView-vs-TextureView about
different backend for XWalkView, and
https://crosswalk-project.org/apis/embeddingapidocs/reference/org/xwalk/core/XWalkPreferences.html#ANIMATABLE_XWALK_VIEW
for how to enable animitable XWalkView. Hope it can work for you.
From: Florian Landerl [mailto:[email protected]]
Sent: Monday, July 7, 2014 5:54 PM
To: Min, Hongbo; [email protected]
Subject: RE: [Crosswalk-help] Transparent WebView
Thanks for your reply, Hongbo.
Unfortunately, calling setAlpha() does not make any difference. Also,
setAlpha() would not yield the result we’re looking for: we need the background
color of the Crosswalk Cordova webview to be transparent. The Cordova webview
should act as some kind of overlay above the other webview.
We tried all of the following but none shows any effect:
* webView.setBackgroundColor(Color.TRANSPARENT);
* webView.setBackgroundDrawable(null);
* webView.setBackgroundResource(0);
Cheers,
Florian
Am 07. Juli 2014 bei 09:24:03, Min, Hongbo ([email protected]) schrieb:
Hi, Florian
Does setAlpha on XWalk webview work for you?
Regards
Hongbo
________________________________
From: Crosswalk-help [[email protected]] on
behalf of Florian Landerl [[email protected]]
Sent: Monday, July 07, 2014 5:39 AM
To: [email protected]
Subject: [Crosswalk-help] Transparent WebView
Hello everyone,
is it possible to have a transparent Crosswalk webview?
In our Cordova project with XWalk webview we want to add an additional XWalk
based webview below the main Cordova view. We managed to create the second
webview but we've found no option so far to make the main webview transparent.
Is this possible at all?
Any help is greatly appreciated.
Thanks in advance!
Cheers,
Florian
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help