Android screen size

Hey guys,

I have a problem with Android screen size. In simulator, if I view as iPhone, it works fine because my content size is fit on 480x320 but Droid, Nexus One do not. There are left and right side black out of the content (I use letterbox scaling). I use director for screen management.

In my application, there are images which translate out of the content size (obj.x is negative and obj.x is greater than 480) but I still display on black background. How can I fix that on Android.

Best,
Rutz

You have to make the background images as big as needed to fill the whole screen. If you want to support both Android and iOS (including iPad) you should use a rect size of 570x360. If you don't plan on supporting 4:3 screens you can get away with 570x320.

Hey @CluelessIdeas would you mind telling if using it as you said above (If you want to support both Android and iOS (including iPad) you should use a rect size of 570x360.) I would need to change the config.lua for use the Width and Height of 320 x 480 respectively or pass to use 360 x 570 and even make the double resolution images for it based on this values (360x570) getting so the final 2x images having 720x1140?

Is my thought right?

Thank you in advance.

Cheers,
Happy Hollidays!
Rodrigo.

I think we can use 320x480 resolution images on 570x360 screen size. Android will lost some resolution but acceptable. What do you think?

The values I said (570x360) are for a stage of 480x320, so if that's what you have in your config.lua you should keep it that way. You can make the 2X images 1140x720 but there's nothing wrong in saving a few MB of texture memory by using 1024x646 as they will be stretched anyway and no one is going to notice that small amount of scaling. If you are doing things correctly to support multiple resolutions you're already using newImageRect for loading images. The only change you need to do is setting those imageRects to a size of 570x360, and then don't forget to position them in the right place - probably aligned in the center of the screen.

@ClueLessIdeas Very much appreciated! Thanks for sharing.

Cheers,
Rodrigo.

Use zoomStretch

views:1580 update:2012/1/3 13:02:13
corona forums © 2003-2011