android game supporting multiple screens

197 views Asked by At

I am creating a small game, and I am really confused how to support for multiple screens.

In some devices my images shows good result but in some other image stretches. I have seen many questions in Stack Overflow, saw some videos, read some other tutorials from various sites, and seen the Developers Android page but can't find out how to fix it.

When I code views with xml, I set units to do least get close results in different screens. But when I work with images it's too hard to support all devices. or else iI can't figure it.

One tutorial I looked at was: http://v-play.net/doc/vplay-different-screen-sizes/ It didn't shared any code, and in other tutorials i found orthographic camara and some related stuff, and in some I found letter boxing.

Letter boxing was clear to understand but no sample code anywhere. How would I adjust images in screens of various sizes by maintaining aspect ratio and sample code for letter boxing? What is orthographic camara? What would be the sample code? It would be great if shared a sample code so that I can figure out how they work. Thank you!

1

There are 1 answers

6
Venkatesh On

Go through the link given below

http://developer.android.com/guide/practices/screens_support.html

Have multiple copies of images each of various size recommended for each devices and place it in the corresponding layout folders

This might help you to solve your problem