Hi, Tim,  Thanks for your feedback.

"The inside of XWalkView is a SurfaceView( If ANIMATABLE_XWALK_VIEW is
true) or TextureView( If ANIMATABLE_XWALK_VIEW is false)."
************************************************************
==> I have edit this description. Please check it.


2. My other issue is the *Transparency* that happens when I set 
ANIMATABLE_XWALK_VIEW to FALSE. I do not know why that is supposed to happen. 
If I leave out that XWalkPreferences.setValue line, then it shows up fine.
************************************************************
==>For transparency, better check with 
https://crosswalk-project.org/jira/browse/XWALK-3308.
XWALK-3742 is for XWalkView overlay with MapView.
BTW, you need to do these to enable transparent: 
1),  Set ANIMATABLE_XWALK_VIEW to false, this only works for SurfaceView.
XWalkPreferences.setValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW,
false);
2), Apply tranparent theme in AndroidManifest.xml
android:theme="@android:style/Theme.Translucent.NoTitleBar"
3), Call xWalkView.setBackgroundColor(Color.TRANSPARENT);


Regards,
XIng

-----Original Message-----
From: Crosswalk-help 
[mailto:[email protected]] On Behalf Of timliu
Sent: Wednesday, May 20, 2015 3:56 AM
To: [email protected]
Subject: [Crosswalk-help] ANIMATABLE_XWALK_VIEW wording, transparency, ...?

I am a bit confused by ANIMATABLE_XWALK_VIEW:

1. I am interested in using SurfaceView instead of TextureView for XWalkView... 
because SurfaceView consumes less resource.

Multiple sources state that FALSE will switch to SurfaceView:
@
https://github.com/crosswalk-project/crosswalk-website/wiki/Android-SurfaceView-vs-TextureView
@
https://crosswalk-project.org/apis/embeddingapidocs_v3/org/xwalk/core/XWalkPreferences.html

Yet, another source says opposite:
@
https://crosswalk-project.org/jira/si/jira.issueviews:issue-html/XWALK-3742/XWALK-3742.html
"The inside of XWalkView is a SurfaceView( If ANIMATABLE_XWALK_VIEW is
true) or TextureView( If ANIMATABLE_XWALK_VIEW is false)."

Anyways, I'm sure setting FALSE is correct...

2. My other issue is the *Transparency* that happens when I set 
ANIMATABLE_XWALK_VIEW to FALSE. I do not know why that is supposed to happen. 
If I leave out that XWalkPreferences.setValue line, then it shows up fine.

Here is my code:
**************************************
if (xWalkWebView == null) {
XWalkPreferences.setValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW,
false);
xWalkWebView = new XWalkView(this, MyActivity.this); }

xWalkWebView.load(myUrl, null);

if (android.os.Build.VERSION.SDK_INT >=
android.os.Build.VERSION_CODES.HONEYCOMB) {
((LinearLayout)
findViewById(R.id.topVWin_holder)).setLayerType(View.LAYER_TYPE_HARDWARE,
null);
xWalkWebView.setLayerType(View.LAYER_TYPE_HARDWARE, null); }

((LinearLayout)
findViewById(R.id.topVWin_holder)).addView(xWalkWebView);
((LinearLayout)
findViewById(R.id.topVWin_holder)).bringChildToFront(xWalkWebView);
xWalkWebView.bringToFront();
xWalkWebView.setAlpha((float) 1.0);
**************************************

I thought it was my LinearLayout holder hiding behind something or that I 
needed to re-set Alpha back to 1.0, but no effect.

I am using the latest version 12.41.x

Thanks!
-Tim

P.S. Does this line work with crosswalk?
xWalkWebView.setLayerType(View.LAYER_TYPE_HARDWARE, null)

xWalkWebView.isHardwareAccelerated() shows TRUE but xWalkWebView.getLayerType() 
shows 0 (=LAYER_TYPE_NONE) _______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to