WebView in scrollview

I am making an app to show a list of products with image and description. However, the description will needed to support style like CSS. As text object doesn’t support inline style, I finally make all the description showing in webview. 

However, I got another problem after changing them all into webview. My product list is showing in a scrollview, so, I don’t want the description to scroll within the webview. So, I tried to use the webview event to put the height of each html into the url in the onload javascript event and resize and reposition everything after that.

Now, I have another problem…I have a header bar located at the top of the screen or scrollview…when the product list scroll, all the description will show on top of the header bar…how can I put the description on the back of the header bar when I scroll the page?

Webviews are “native” objects. Corona’s core display and widget objects are OpenGL objects. No operating system allows native and OpenGL objects to really work together. To get this to work, all native.* objects sit on top of OpenGL. While we have engineered it in a way that if you insert a native object into a display.newGroup (which a ScrollView basically is) it will move with the openGL group, it’s still going to be on top. The effect is if you have a native.newWebView() in should move as the scrollView scrolls, but if you have other things like a tabBar at the bottom or a navigation bar/header/menu at the top of the screen, the scrollView will draw on top, which is not desirable.

What I would do is not use a scrollView at all and just let the webView the scroll the HTML content within itself.

Rob

Webviews are “native” objects. Corona’s core display and widget objects are OpenGL objects. No operating system allows native and OpenGL objects to really work together. To get this to work, all native.* objects sit on top of OpenGL. While we have engineered it in a way that if you insert a native object into a display.newGroup (which a ScrollView basically is) it will move with the openGL group, it’s still going to be on top. The effect is if you have a native.newWebView() in should move as the scrollView scrolls, but if you have other things like a tabBar at the bottom or a navigation bar/header/menu at the top of the screen, the scrollView will draw on top, which is not desirable.

What I would do is not use a scrollView at all and just let the webView the scroll the HTML content within itself.

Rob