Michiel,

Thanks for taking the time to write this. Since you mention forking Crosswalk, 
I just want to point out that there is also the option of contributing to 
Crosswalk upstream directly, which we encourage.

Kind regards,

Francesco

From: Michiel van den Anker <[email protected]<mailto:[email protected]>>
Date: Wednesday 17 September 2014 21:54
To: 
"[email protected]<mailto:[email protected]>"
 
<[email protected]<mailto:[email protected]>>
Subject: [Crosswalk-help] Crosswalk Embedding - XWalkView / WebView comparison

Crosswalk Embedding
---

Dear Crosswalk team,

I am using XWalkView as a drop-in replacement for WebView after following the 
documentation 
(https://crosswalk-project.org/#documentation/embedding_crosswalk).

Things are working out well, but I would to point out a few complications I 
encountered in porting the usage of WebView over to XWalkView.

First, WebView is based on AbsoluteLayout and XWalkView is based on 
FrameLayout, so position of children have to be converted to use margins 
instead of x/y values.

WebView contains 0 children and XWalkView contains a child of type XWalkContent 
by default so calls to 'removeAllChildren' had to be changed to keep the 
XWalkContent instance present.

Because of this XWalkContent-child it seems no longer possible to attach a 
touch listener directly and have it work. It caused me to blindly snatch a 
JellyBeanContentView by calling '((ViewGroup)getChildAt(0)).getChildAt(1)'. 
This View receives all the touch events.

Lastly, I have to find a workaround for code that relies on 
'computeVerticalScrollOffset' et al.

These methods are protected but extending a WebView was previously sufficient 
to call them and get correct results. Not with XWalkView where, I suspect, I 
should call these from within JellyBeanContentView or similar.

My options to overcome this last step are:
1. Get the information from JavaScript (looks to be easy)
2. Fork Crosswalk and extend some classes to expose these methods


Thank you for your time, I don't need direct help but hopefully this 
information is useful in shaping the CrossWalk Embedded API.


Kind regards,

Michiel van den Anker / Team51

--
[http://static.team51.nl/asset/image/signature/michiel.png]

Michiel van den Anker // M-21
T.  +31(0)20 737 01 88

Team51 B.V.
Vlaardingenlaan 15
1062 HM  Amsterdam

KvK: 57317127
BTW: NL852528814B01
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to