Hacker News new | past | comments | ask | show | jobs | submit login

So if you ignore all the weird screen sizes it is only fragmented into 4 different sizes? And you still have to create layouts for each of those sizes? I wouldn't say the point was very strongly made.



I can confirm this, at least for games. For the last game I made, I had to have all assets in 4 sizes, which makes it look nice in all resolutions ranging from 800x450 to Nexus10 2560x1600. I maintain the aspect ratio and have background that is larger (both wider and taller) than "playing field", so that I can fill up that space on devices with different aspect ratio. What article fails to mention that all Android devices have aspect ratio between 4:3 and 16:9, and you should design around that.

The background image looks like this (not my game):

http://blog.gemserk.com/wp-content/uploads/2013/01/mainmenu-...

the area inside red rectangle is guaranteed to be shown on all devices, and area outside that is the filler.

Now, to make sure your "action area":

- uses device native resolution for crisp image and

- is not too small

...you have to have all the assets in different sizes. I found that having 4 different sizes does this nicely:

    1. targeting 800x450 action area
    2. targeting 1280x720 
    3. targeting 1920x1080
    4. targeting 2560x1440
Now, you could pick different boundaries, but a lot of devices use 800, 1280 or 1920 as their base width.

The only drawback to this is that some tablets with 1024px width would have a lot of filler area because they would use 800x450 assets. So, having:

    5. targeting 1024x576
would make it complete. But I'm not sure there are many 1024px devices out there, so I skipped that one.


No, if you ignore a tiny segment of the market the changes in screen sizes are tiny. And you have been able to create scalable views (and really have only had the option of doing so) since day one, so mostly you just create a single layout.

The tools on Android are very similar to the ones on the web - they are designed to scale and stretch because they need to.


You could build one layout using relative positioning and have it scale to each of those easily. If you want different layouts for different devices, this is an option, but by default things won't break unless you're explicitly positioning things absolutely instead of relatively.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: