开发者

What base resolution to design for with Android?

I am new to designing interfaces for Android. (I have gone through the Multiple Screens section in the Developer G开发者_运维技巧uide.) What base resolution are you designing your screens for?


That is based on your app is for phone, or tablet, or both. Currently when designing layout for phone's app, there are three most basic resolution:
- 320dip x 480dip (normally 320px x 480px phone)
- 320dip x 533dip (normally 480px x 800px phone)
- 320dip x 569dip (normally 480px x 854px phone)

So when you design layout for phone's app, please remember:
1. Always use dip for width, height and sp for text size
2. A layout fit 320dip x 480dip screen will fit the other two
3. match_parent, wrap_content, gravity... are powerful Android XML layout attributes
4. Choose the orientation (landscape, portrait) carefully, normally an app requires only one orientation

The same goes for tablet's app, choose the most normal screens and create layout for the smallest one, and stretch the layout on bigger one.

But for both tablet and phone, you should use dimens.xml to store layout values. Reference here: http://developer.android.com/guide/topics/resources/more-resources.html#Dimension

Good luck with Android nightmare :)


Dont design for specific screen resolution!

Design for a range of devices either small screen, Medium screen or large screen.

Following are generic irrespective of your screen size. Best layout is LinearLayout and RelativeLayout. Bes metrics for Views 'dp' and for fonts 'sp'

Hope this helps!


I recommend base resolution for 320x480 pixel screen as this is supported by most number of devices. But you need to provide assets for hdpi (High Density), mdpi (medium density), ldpi (low density), xhdpi (xtra high density) specially images, buttons etc.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜