开发者

Different screen sizes for android

I am designing an android game, and have so far test it 开发者_运维问答only on a 480 x 800 pixel emulator, obviously this isn't suitable for all phones. I completely understand with layouts and xml and drawables the need to create them in different sizes, but what about when it comes to canvas methods such as drawing bitmaps, because they would be drawn in different positions on different size screens etc

Thanks in advance

Ben


Personally I dont use different size images for different phones, my images are scales up/down depending on the phone but I make sure the resolution looks good on all phones.

It depends how you have coded really, best way to find out is to scale some of your objects and try it on a different emulator. If its all messed up you will need to make changes.

Have you made the game by pure points such as x = 200, y = 200 of have you done something like x = screenLength/3, y = screenHeight/10?


The problem isn't just the number of pixels, but also how many pixels are in an inch. That's why Android uses "density independence pixels". If you follow Android's dpi conventions and allow it to fit bitmaps for you, you'll find that scaling, positioning, etc. becomes automatic.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜