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

Reply via email to