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

Web and WebWorks Development

Reply
Developer
smartek
Posts: 281
Registered: ‎05-31-2012
My Carrier: o2
Accepted Solution

how to set the background color of a app in bbui.js?

how can i set the background color of a app which is using bbui.js?

 

its not working just to set a:

body {
	background-color: #000000;
}

 

Plase "+Like" my post if it was helpful.
Please use plain text.
Contributor
aaroncajes
Posts: 14
Registered: ‎10-24-2012
My Carrier: Globe Telecoms

Re: how to set the background color of a app in bbui.js?

I have the same issue back then with jQuery mobile. All you have to do is to target the "main" container of your <div>.

Example:

HTML:

<div id="main" data-role="page">
<div data-role="header">
<h1>Welcome to My Sample App!</h1>
</div>
<div data-role="content">
</div>
</div>

CSS:

#main
{
background: #000000;
}

Hope this technique works with bbUi.js. Happy Hacking! :smileyhappy:
Core Member, PinoyBBDev
http://www.pinoybbdev.com
http://www.aaroncajes.com
http://www.twitter.com/aaroncajes
Please use plain text.
Developer
scrid2000
Posts: 142
Registered: ‎07-27-2011
My Carrier: T-Mobile

Re: how to set the background color of a app in bbui.js?

[ Edited ]

Find these lines in the bbui.css file and edit the white to the color you want:

 

.bb-bb10-lowres-screen {
font-size: 16pt;
position:absolute;
top:0px;
left:0px;
bottom:0px;
right: 0px;
background-color: white;
}

.bb-bb10-hires-screen {
font-size: 30pt;
position:absolute;
top:0px;
left:0px;
bottom:0px;
right: 0px;
background-color: white;
}

-----------------------------------------------------------------------------------------



Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,702
Registered: ‎10-16-2008
My Carrier: Rogers

Re: how to set the background color of a app in bbui.js?

It's even easier than that.. just set the style or class on your screen <div>

 

https://github.com/blackberry/bbUI.js/blob/master/samples/checkboxes.htm#L17

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
scrid2000
Posts: 142
Registered: ‎07-27-2011
My Carrier: T-Mobile

Re: how to set the background color of a app in bbui.js?

I assumed he wanted to set the background for the entire app :smileyhappy: but yes, if you just want to do it for a single page, definitely just edit the div.
-----------------------------------------------------------------------------------------



Please use plain text.