How to support all the different resolutions of android products

前端 未结 5 1627
我在风中等你
我在风中等你 2020-12-03 02:20

All the different resolutions of the different Android products are driving me nuts.

My first android app that I wrote was designed so it supported the three commonl

5条回答
  •  旧时难觅i
    2020-12-03 02:29

    I ran into this problem as well, except my app is a game where there is one SurfaceView canvas that I draw background images and sprites to (similar to LunarLander example).

    The way you handle it here is to extend your background image to the largest size you are willing to support (540x960) but you keep all the important things (like buttons, text, information, etc) within a smaller rectangle of 480x800. You can extend the image itself, or just add borders. The key is that nothing important is there.

    People with 480x800 phones will see your normal app. People with 540x960 phones will see a little extra border.

提交回复
热议问题