If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
New Developer
Navaneeth
Posts: 26
Registered: ‎05-09-2013
My Device: Blackberry Z10
My Carrier: Vodafone
Accepted Solution

Sizing Problems

My webworks app looks good in my pc but when i deploy it to the device, the size is reduced. But if i double tao on the screen the size enlarges but the review team is not accepting the application. Please help me out with this issue.

Please use plain text.
Developer
DirkLuys
Posts: 123
Registered: ‎02-13-2012
My Device: Z10 LE
My Carrier: Mobistar

Re: Sizing Problems

This probably has something to do with the screens pixel density, I always place this in the head of ALL the html files I use for webworks:

 

<head>
    <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>
</head>

 This fixed similar problems for me in the past.

Please click the like button if my post helped you! Thank you.
Please use plain text.
Developer
DirkLuys
Posts: 123
Registered: ‎02-13-2012
My Device: Z10 LE
My Carrier: Mobistar

Re: Sizing Problems

Here's a more complete KB articleon the subject: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-set-up-the-viewport-for-a...

It gives a better explanation of the problem and the solution, but essentially it is the same.

Please click the like button if my post helped you! Thank you.
Please use plain text.