Welcome!

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

Adobe AIR Development

Reply
Regular Visitor
alexfoo
Posts: 1
Registered: ‎05-11-2012
My Device: PlayBook
My Carrier: na

QNXStageWebVIew CSS background-image to use local image file

Hi all,

 

I'm almost 100% sure now that we cannot customize the background image/color of a stagewebview 'component'.

 

The app Im working on requires a background image to be displayed behind a loadString() content. My idea now is to inject a CSS background-image style into the content string. Currently I've been able to succesful inject css into the content string, and format the html string as I wish.

 

For the css background test, I inject the CSS style

body{ background-image:url("www.someDomain.com/background.png"); }

and voila, a background image is shown in the stagewebview, using the image from a remote server.

 

Now comes the problem, the app will load many pages of content, and I want to avoid having to reload the background image. It would be great if we can use a local image file for the css e.g.

body{ background-image:url("assets/background.png"); }

 

I've been looking around the forum that tackles getting local file urls (here) and used that as the url for the css but have been in vain. So i'm turning to you guys for some assistance in this matter.

Please use plain text.
Developer
lrrm
Posts: 306
Registered: ‎03-01-2011
My Device: Playbook (sim)
My Carrier: Base

Re: QNXStageWebVIew CSS background-image to use local image file

can't you preprocess this string?
..................................................................................................................................................................................................................

My App: Peg Solitaire

Need a designer? Drop me a line
Please use plain text.