Is it possible to show something on top of a webView?

I saw the document says the webView is always on top.

And after my testing, it’s true (of course, lol). If I put some image after webView is called, the webView is still on the top.

However, I am still thinking if it’s possible to show some menu on top of a webView? I see some apps (probably not developed by Corona SDK) can show something (like a loading indication or a menu) on top of a webView.

Here is my situation… I have a top navigation bar that already shows some icons (like forward,back,refresh), now I would like to add something like sharing by email, sharing by SMS, sharing by Facebok, Open in Safari, etc etc… 

I don’t want to put all these buttons on the navigation bar (which would be too crowded and ugly) and I don’t want to add more height of the navigation bar, because I want to leave most of the screen for the webView or the users would hate it that I take too much space from the webView they are really browsing at.

Any thoughts? Or it’s the limitation I have to live with? Any possible solution in the future (to be solved by Corona)?

Thanks.

Hi Joe,

In Corona, all display objects (images, vector objects, sprites) live in the OpenGL canvas, which appears below native system objects such as system alerts, the system activity indicator, and webViews.  There’s no way to show a display object on top of a webView.

One possible approach for your case is that webViews are resizable.  So, a user could tap some icon on your navigation bar which expands the navigation bar to show additional options, at the same time reducing the size of the webView.

  • Andrew

Thanks, aukStudios… That’s some good advise. Although it’s not the perfect solution, at least it’s one of the best under current limitation.

Another question… So for those apps that can place something on top of a webView, they are definitely not using Corona, right? So they can put some native objects on top of a webView?

Yes, if you see an app that places an image on top of a webView, then I think they’re using something other than Corona.

  • Andrew

Hi Joe,

In Corona, all display objects (images, vector objects, sprites) live in the OpenGL canvas, which appears below native system objects such as system alerts, the system activity indicator, and webViews.  There’s no way to show a display object on top of a webView.

One possible approach for your case is that webViews are resizable.  So, a user could tap some icon on your navigation bar which expands the navigation bar to show additional options, at the same time reducing the size of the webView.

  • Andrew

Thanks, aukStudios… That’s some good advise. Although it’s not the perfect solution, at least it’s one of the best under current limitation.

Another question… So for those apps that can place something on top of a webView, they are definitely not using Corona, right? So they can put some native objects on top of a webView?

Yes, if you see an app that places an image on top of a webView, then I think they’re using something other than Corona.

  • Andrew