Reputation: 179
Ok, I have a background image for a level in my game. It is the second level I have made so far. Everything looks fine on every simulated device, but when I build the app for Android, and install it on my Nexus 7, the background image is about a third the size it should be. Everything else is fine, but that one background image! I have had this problem before with other apps too. Any ideas on how to fix this?
Here is the code
local bg = display.newImage("backyard.png")
bg.x=350
bg.y=400
game:insert( bg )
Upvotes: 1
Views: 139
Reputation: 7390
I don't exactly know how you are coded. But I can give you a suggestion for such issues with background images. Just create your background image as follows:
local bg = display.newImageRect("bg.png",display.contentWidth,display.contentHeight)
bg.x = display.contentWidth/2
bg.y = display.contentHeight/2
Keep coding................ 😃
Upvotes: 1