Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 30
Registered: ‎11-09-2012
My Device: Dev Alpha A
My Carrier: Airtel

WebView opacity:0.0 has no impact

Looks like there is no impact of setting opacity to 0.0 to WebView control. its still gets shown.

Only visible = false works but ideally I would like to use opacity.


any idea if this is a known issue or any workaround for the same?

Posts: 323
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: WebView opacity:0.0 has no impact

Do you really want an opacity of 0 "zero"? e.g. a Non-Visible WebView?


or do you want a WebView with a background transparency?




WebView {

  id: myWebView
  settings.background: Color.Transparent

  url: "local:///assets/somePage.html"



The transparency works (I know, I use it in several places)... but if you want to have a fully transparent webview where no content is shown... just load it offscreen where the user can't see it.

PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: WebView opacity:0.0 has no impact

I believe WebView is handled much like ForeignWindowControl, which would explain why you can't control its opacity like that. (This is largely guesswork.)

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!