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
Developer
Posts: 160
Registered: ‎03-12-2011
My Device: PlayBook♥
My Carrier: eplus

BBUI & Viewport Problem

Hi guys,

 

I'm working on a maps app right now using BBUI & web works.

The functionality is great - thanks to video uploaded earlier.

 

The thing is that the map itself is way to "small". Don't get me wrong - it fills the device size.

But there are two problems:

 

1) the meta tag I'm usually using: 

<meta name="viewport" content="width=384, initial-scale=1.0, user-scalable=no">

 

is not working.

 

---> 2) the map's width and height must be 768x1280 to fill the device.

----> the markers, street view etc. are extremely small, not user friendly at all.

 

I guess this is becuase of BBUI because in former projects, not using BBUI, I was always able to use the meta tag and make it more user friendly.

 

Can anybody please help me out?

----------
Please give free Likes if I helped you out! Smiley Happy
Developer
Posts: 160
Registered: ‎03-12-2011
My Device: PlayBook♥
My Carrier: eplus

Re: BBUI & Viewport Problem

[ Edited ]

I just noticed this: https://github.com/blackberry/bbUI.js/issues/295

But it doesn't provide me with a solution...

 

Inside the BBUI.js search for "viewport" and delete commands done there.

 

But I guess everything's even worse now :smileysad:

 

 

It seems BBUI is fixed to the screen size of the Dev Alpha so changing this makes every proportion go crazy. Smiley Sad

----------
Please give free Likes if I helped you out! Smiley Happy
Developer
Posts: 160
Registered: ‎03-12-2011
My Device: PlayBook♥
My Carrier: eplus

Re: BBUI & Viewport Problem

[ Edited ]
 
----------
Please give free Likes if I helped you out! Smiley Happy
Developer
Posts: 160
Registered: ‎03-12-2011
My Device: PlayBook♥
My Carrier: eplus

Re: BBUI & Viewport Problem

[ Edited ]
 
----------
Please give free Likes if I helped you out! Smiley Happy
Developer
Posts: 222
Registered: ‎03-03-2012
My Device: Ripple, LE Z10, Dev Alpha _C, Playbook, Bold 9900
My Carrier: rogers

Re: BBUI & Viewport Problem

try this :

 

<style type="text/css">  html { height: 100% }  body { height: 100%; margin: 0; padding: 0 }  #map_canvas { height: 100% }</style>

 This CSS declaration indicates that the map container<div>(named map_canvas) should take up 100% of the height of the HTML body. Note that we must specifically declare those percentages for<body> and <html> as well.

Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: BBUI & Viewport Problem

Wotcha Flo

 

Try this...

 

Skip the width in the meta - that will definitely make this happen

 

If you wanna get everything fitting nicely measure the screen with some easy JS

 

     var wh = window.innerHeight;
     var ww = window.innerWidth;

You can now size and place everything as you wish

 

Mail me if you need the complex explanation




Click the like button if you find my posts useful!
Highlighted
Developer
Posts: 160
Registered: ‎03-12-2011
My Device: PlayBook♥
My Carrier: eplus

Re: BBUI & Viewport Problem

Guys thank you very much for your ideas but unfortunately I've tried all of this.
I'll mail you later Simon, thanks!
----------
Please give free Likes if I helped you out! Smiley Happy
Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: BBUI & Viewport Problem

Sure Flo

 

Send me the source and I'll have a play




Click the like button if you find my posts useful!
Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: BBUI & Viewport Problem

[ Edited ]

Try this as view port meta tag.......        <script> var meta = document.createElement("meta"); meta.setAttribute('name','viewport'); meta.setAttribute('content','initial-scale='+ (1/window.devicePixelRatio) + ',user-scalable=no'); document.getElementsByTagName('head')[0].appendChild(meta); </script>