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
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900
My Carrier: AT&T

Landscape & portrait

How can i make an app both landscape and portrait without making the images look scretched or distorted?

 

 

 

Thank you in advance. 

Developer
Posts: 21
Registered: ‎02-03-2012
My Device: PlayBook 16g
My Carrier: MTSm

Re: Landscape & portrait

The best solution is to make your image large, and scale it down. That way, you do not see stretching.

 

(i.e.) if the image is 1024x600, you can scale it down to 512x300 without issue

Developer
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900
My Carrier: AT&T

Re: Landscape & portrait

i know but its not the same. if i go from landscape from portrait the quality goes down and the pb just screws it up.

 

Do i need to make another app with different sizes?

Developer
Posts: 21
Registered: ‎02-03-2012
My Device: PlayBook 16g
My Carrier: MTSm

Re: Landscape & portrait

Here is an example of an orientation change event:

 

http://blackberry.github.com/WebWorks-Samples/kitchenSink/html/browser/orientation.html

 

You could use that opportunity to see if you can scale properly, or have a second image that is smaller to load.

 

Highlighted
New Developer
Posts: 6
Registered: ‎05-09-2012
My Device: Blackberry 9800
My Carrier: Rogers

Re: Landscape & portrait

Look into the CSS . Give your image a max-width, and a width of 100% inside a div. Once the orientation changes, the image should shrink granted the div gets compressed.

Developer
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900
My Carrier: AT&T

Re: Landscape & portrait

I totally forgot about the %'s in css. Thanks. I'll give that a shot!

New Developer
Posts: 6
Registered: ‎05-09-2012
My Device: Blackberry 9800
My Carrier: Rogers

Re: Landscape & portrait

let me know how it goes. it is something I will be incorperating in my upcoming app.