【问题标题】:Which screen size and density should I design Android for?我应该为哪种屏幕尺寸和密度设计 Android?
【发布时间】:2012-10-10 14:00:10
【问题描述】:

我一直在阅读有关 Android 屏幕尺寸支持的 4 屏幕尺寸和 4 密度的资料。我想启动并运行一个快速原型应用程序。是否有任何类型的策略,或者我应该(基于设备尺寸+密度,主要使用百分比)设计具有 med+high+xhigh dpi 的正常屏幕尺寸?这里有最佳做法吗?

【问题讨论】:

标签: android


【解决方案1】:

//首先开始设计MDPI

Baseline phone  mdpi    320x480

你可以将你的drawables增加到HDPI1.5XHDPI2

TVDPI 它将使用 HDPI 资产自动扩展。 213/160 =1.33

Ref here:

 1. Use wrap_content, fill_parent, or dp units when specifying
    dimensions in an XML layout file.
 2. Do not use hard coded pixel values in your application code
 3. Do not use AbsoluteLayout (it's deprecated) 
 4. Supply alternative bitmap drawables for different screen densities

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多