Layout/Graphics question


  1. ophilatry

    ophilatry New Member

    Hi, I am working on porting an iOS game to Android and I'm confused about some things. I read through the "Supporting Multiple Screens" guide page, but I still need some more help. Our artist made a lot of pretty but complex UIs out of images that take up the whole size of the iPhone (320dp x 480dp [actually 640 x 960]).
    I understand that she has to design new images and layouts for the different screen sizes so that I can make different layout-_____.xml pages, but I'm not sure how to tell her to do that. The guide page has a range of resolutions for each size, but we want the UIs to always fill the page and look correct for every size screen. In practice, is there just one resolution per "size" that we can assume, or will we just have to have small gaps sometimes?
    I feel like there is a logical and simple solution to this since I haven't found many other threads about it, but I am at a loss.

    Advertisement
    :
  2. jonbonazza

    jonbonazza Well-Known Member

    She doesn't need to create multiple layouts for every screen size. In fact, it's entirely possible to only use one layout for every screen size. You just need to remember not to use pixel measurements, but instead using device independant pixels (dip or dp). Also, Android's dynamic layouts are very powerful if used correctly, so things can be placed and sized in a manner that looks the same on every device.
  3. Kostas G

    Kostas G Active Member

    In my opinion there isn't an easy and simple solution for this problem. It is one thing to design a UI for a single screen and another thing to design it for multiple screen resolutions and multiple screen sizes.

    Start from reading (again and again) the Supporting Mulitple Screens in Android's documentation. The Testing your application section I've linked is particularly useful. From the combinations (screen size and screen resolution) select two or three and give them to your artist. Consult the Screen Sizes and Densities dashboard to see which combinations matter the post.

    After the designs have been handed to you, then your developer team will start the implementation of the dynamic layouts. You will do that using different drawable folders, styles and all the advices presented in the article.

    Let's say for example that your designer has created a UI for large screens and 480x800 resolution. You need to make sure that the UI looks OK for a 480x854 large screen as well. To do that you need to avoid absolute pixel measurements and use dip. For medium screens and 1024x768 resolution the designer's UI could be different. 1280x768, 1280x800 are similar resolutions and will be supported by the same xml layout.
Loading...

Share This Page