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 -- *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
_______________________________________________ Crosswalk-help mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
