【问题标题】:background image size for mobile devices移动设备的背景图像大小
【发布时间】:2016-06-24 07:45:57
【问题描述】:

我想在我的安卓应用程序中显示背景图像。
适合移动设备所有屏幕分辨率的理想图像尺寸(宽度和高度)是多少?

【问题讨论】:

    标签: android mobile screen-resolution


    【解决方案1】:

    id 说理想的是使用最高的屏幕密度,这样应用程序会缩小它以适应较低的屏幕分辨率,这样你就不会在更大的屏幕上降低质量,这是我从这里得到的图表

    xlarge screens are at least 960dp x 720dp
    large screens are at least 640dp x 480dp
    normal screens are at least 470dp x 320dp
    small screens are at least 426dp x 320dp
    Generalised Dpi values for screens:
    
    ldpi Resources for low-density (ldpi) screens (~120dpi)
    mdpi Resources for medium-density (mdpi) screens (~160dpi). (This is the baseline     density.)
    hdpi Resources for high-density (hdpi) screens (~240dpi).
    xhdpi Resources for extra high-density (xhdpi) screens (~320dpi).
    Therefore generalised size of your resources (assuming they are full screen):
    
    ldpi
    Vertical = 426 * 120 / 160 = 319.5px
    Horizontal = 320 * 120 / 160 = 240px
    mdpi
    Vertical = 470 * 160 / 160 = 470px
    Horizontal = 320 * 160 / 160 = 320px
    hdpi
    Vertical = 640 * 240 / 160 = 960px
    Horizontal = 480 * 240 / 160 = 720px
    xhdpi
    Vertical = 960 * 320 / 160 = 1920px
    Horizontal = 720 * 320 / 160 = 1440px
    
    px = dp*dpi/160
    

    【讨论】:

    • 另外提醒一下,对于最近发布的 Galaxy S4,您可能需要添加 xxhdpi 以支持更广泛的密度。
    【解决方案2】:

    请参考以下链接..

    这与@JRowan 的回答一起将引导你正确的方向..

    【讨论】:

      猜你喜欢
      • 2016-02-15
      • 2013-03-27
      • 2017-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-10
      • 2017-07-18
      • 2012-12-11
      相关资源
      最近更新 更多