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
Highlighted
New Contributor
Posts: 8
Registered: ‎11-12-2012
My Device: 9800
My Carrier: Koodo
Accepted Solution

BB10 - App appears zoomed-in

I'm converting a WebWorks app from PlayBook to BB10, and when I load on my Alpha device, everything appears highly zoomed-in. In Ripple it appears fine.

 

I have tried

   <meta id="viewport" name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" />

 and

 

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);

 but in both cases I get the following screenshot (taken on device, with remote web inspector running to show dimensions of image)

 

 

 

Web inspector is showing an image resolution of 175x254, however when measuring in the screenshot it is closed to 395x575.

 

New Contributor
Posts: 8
Registered: ‎11-12-2012
My Device: 9800
My Carrier: Koodo

Re: BB10 - App appears zoomed-in

Nevermind...had to remove the HTML meta and then the Javascript set one worked.
BlackBerry Development Advisor
Posts: 757
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: BB10 - App appears zoomed-in

Glad you were able to sort it all out.  I marked your answer as the solution to help others out as well.