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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Developer
Posts: 281
Registered: ‎05-31-2012
My Device: Playbook
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.
Contributor
Posts: 14
Registered: ‎10-24-2012
My Device: BlackBerry Z10 Limited Edition
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! Smiley Happy
Core Member, PinoyBBDev
http://www.pinoybbdev.com
http://www.aaroncajes.com
http://www.twitter.com/aaroncajes
Developer
Posts: 142
Registered: ‎07-27-2011
My Device: Red Z10, 32GB PlayBook, Numerous Android/WP8/FirefoxOS/Other devices
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;
}

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



Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
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
Developer
Posts: 142
Registered: ‎07-27-2011
My Device: Red Z10, 32GB PlayBook, Numerous Android/WP8/FirefoxOS/Other devices
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 Smiley Happy but yes, if you just want to do it for a single page, definitely just edit the div.
-----------------------------------------------------------------------------------------