Hi, sorry for late response.
This is an interesting question. I did several tests on Android 5.0.2/latest
crosswalk.
1), with default settings and ANIMATABLE_XWALK_VIEW to be true or false, onDraw
will not be called.
2), After new XWalkView, I add XWalkView.setWillNotDraw(false);
onDraw will be called when start. But will not be called when I touch the
webpage and navigator to another page.
3), After new XWalkView, I add XWalkView.setWillNotDraw(false); and in the
Activity code, I add some code to manual trigger invalidate:
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
super.dispatchTouchEvent(ev);
if (ev.getAction() == MotionEvent.ACTION_UP) {
xWalkView.invalidate();
}
return true;
}
Then onDraw will be called when start. And every time I click the web page,
onDraw will be called too.
So as a workaround, maybe you can try option 3. If any side effect, please
feedback to us.
Regards,
Xing
From: Crosswalk-help
[mailto:[email protected]] On Behalf Of Pablo
Burstein
Sent: Sunday, July 12, 2015 9:31 PM
To: [email protected]
Subject: [Crosswalk-help] XWalkView's onDraw() never called
Hi guys,
I need to intercept onDraw() but it's never called. This can be done with
WebView but not with XWalkView. Any leads?
Thanks,
Pablo
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help