WebView obscures other UI elements, despite being positioned away. (IE Sony Double Tap Zoom)

With our recent run of testing, we have noticed something quite particular with the Corona SDK. Whenever you are using a Sony device, in a page that has UI (Corona generated Imageviews, etc) and a WebView (Native Webview), and you have zoomed in on the page, and scroll through the webview, parts of the UI get turned black.

 

I positioned my UI specifically in a way that the UI would not intersect with the Webview. I know that the Graphical Hiearchy does not allow any other UI elements to overlap the Webview without being obscured in some way. Is there any solution to this particular issue? Thanks

 

We have noticed that this only affect Sony devices. We have tested on various other devices, without this issue occuring.

 

//------------------------------------------------- Source Code ------------------------------------------------//

 

local topBarBackground = display.newImageRect(“bg2.jpg”, _W, 80)

topBarBackground.x = _W * 0.5

topBarBackground.y = 30

local backButton = display.newImageRect(“btna.png”, 64, 64)

backButton.x = 40

backButton.y = 30

backButton.name = “back”

local refreshButton = display.newImageRect(“btnb.png”, 64, 64)

refreshButton.x = 110

refreshButton.y = 30

refreshButton.name = “refresh”

local homeButton = display.newImageRect(“btnd.png”, 64, 64)

homeButton.x = 490

homeButton.y = 30

homeButton.name = “home”

local exitButton = display.newImageRect(“btnc.png”, 64, 64)

exitButton.x = 560

exitButton.y = 30 --0

exitButton.name = “exit”

webView = native.newWebView( 0, 70, 600, _H - 42 )

 

– Attach Listeners, etc –

 

//------------------------------------------------- Source Code ------------------------------------------------//

 

Thanks for any tips or advice, or fixes.

I’m guessing that your Sony device is running Android OS version 4.0.
 
That version of the Android OS has very buggy hardware accelerated render for its native UI which Google did not fix until Android 4.1.  The only known work-around is to disable hardware acceleration for the offending native view.  You can “trick” Corona into disabling hardware acceleration for you WebView by doing the following…

-- Briefly making the view semi-transparent and then opaque forces Corona -- to disable hardware acceleration for the view to avoid rendering glitches -- on Android 4.0 devices. webView.alpha = 0.9 webView.alpha = 1.0

 
I hope this helps!

I’m guessing that your Sony device is running Android OS version 4.0.
 
That version of the Android OS has very buggy hardware accelerated render for its native UI which Google did not fix until Android 4.1.  The only known work-around is to disable hardware acceleration for the offending native view.  You can “trick” Corona into disabling hardware acceleration for you WebView by doing the following…

-- Briefly making the view semi-transparent and then opaque forces Corona -- to disable hardware acceleration for the view to avoid rendering glitches -- on Android 4.0 devices. webView.alpha = 0.9 webView.alpha = 1.0

 
I hope this helps!