DisplayObject Positioning

Hi, I’m new to Corona (day 1), so all apologies for the newbie questions I’ll be asking!

I set up a blank project with a dimension of 320x480 (phone preset) and I’m adding a rectangle to the scene , which I’d like to place at position 0,0 across the different devices.

I did the following:

display.setStatusBar( display.HiddenStatusBar )  
local rect = display.newRect(0,0, 200, 200)  
  • This works fine for iPhone, iPhone4.
  • For iPad a gap at the top is added (about 30px)
  • For the Android devices a gap at the left is added (about 40px I’d say)

What am I missing?

Tia!
S. [import]uid: 133444 topic_id: 29827 reply_id: 329827[/import]

Here’s a blogpost that might help:
http://www.coronalabs.com/blog/2010/11/20/content-scaling-made-easy/

There is a really good forum post regarding the same topic, but I don’t have the link handy. There is also a really good code on code share addressing the same. If the blog post wasn’t enough to shed a light for you, it is worth looking for them.

Naomi
[import]uid: 67217 topic_id: 29827 reply_id: 119637[/import]

Here’s a blogpost that might help:
http://www.coronalabs.com/blog/2010/11/20/content-scaling-made-easy/

There is a really good forum post regarding the same topic, but I don’t have the link handy. There is also a really good code on code share addressing the same. If the blog post wasn’t enough to shed a light for you, it is worth looking for them.

Naomi
[import]uid: 67217 topic_id: 29827 reply_id: 119637[/import]

This is the forum post Naomi is talking about -

http://developer.coronalabs.com/forum/2012/03/12/understanding-letterbox-scalling

Dave [import]uid: 117617 topic_id: 29827 reply_id: 120635[/import]

This is the forum post Naomi is talking about -

http://developer.coronalabs.com/forum/2012/03/12/understanding-letterbox-scalling

Dave [import]uid: 117617 topic_id: 29827 reply_id: 120635[/import]