安卓:多重图像密度支持 - 规模高度宽度和DPI? [英] Android: Multiple Image Density support - scale height width and dpi?

查看:89
本文介绍了安卓:多重图像密度支持 - 规模高度宽度和DPI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android应用程序,我想添加支持不同的密度,屏幕尺寸等。我已经开发上的HVGA支持模拟器的应用程序,并使用我们的iPhone应用程序的所有图标果然不错由于该决议是在小320x480。一切现在看起来不错,但我阅读了官方Android文件后有点糊涂了。对于布局我会通过,并确保一切都在DP单位,但是当涉及到​​我迷失图像。我知道,MDPI是160,但是我该怎么告诉我的设计师是什么华电国际形象需要呢?我们是否需要增加的高度和宽度和dpi的?或者是它只是不够离开DPI的是,增加的高度宽度?举例来说,如果我有一个形象,就是100×100 dpi的160,以使其在华电国际屏幕上相同的它现在应该是150×150,240 dpi的?假设,如果我离开dpi的分辨率和160它只是有点模糊?很抱歉愚蠢的问题,但我只是想确保我做的一切权利,我真的是一个C语言开发,没有图形体验可言....没有任何借口可言,但是可以使用一些帮助。我看到一些例子,闪屏MDPI是小320x480在160 dpi的,但随后的华电国际闪屏是480×800 240显然480×1.5不等于800。此外,看着图标在Android SDK中后,它们只向上扩展的宽度和高度,而不是dpi的。可能是因为他们的图标,并不需要呢?迷失在photoshop中的土地......

I have an android app that I'm trying to add support for different densities, screen sizes, etc. I've developed the app on the simulator with the HVGA support and used all icons from our iphone app which turns out nice since the resolution was at 320x480. Everything looks good now but I'm a bit confused after reading the official android documentation. For layouts I'm going through and ensuring everything is in dp units but when it comes to the images I'm lost. I know that mdpi is 160 but what do I tell my designer for what the hdpi image needs to be? Do we need to increase the height and width and the dpi? Or is it simply enough to leave the dpi as is and increase the height width? For example, if I have an image that's 100 x 100 with 160 dpi, in order to render it identical on an hdpi screen it should now be 150 x 150 with 240 dpi? Assuming if I leave the dpi at 160 it will just be a little blurred? Sorry about silly question but I just want to make sure I'm doing everything right and I'm really a C developer with no graphics experience at all.... No excuse at all but could use some help. I saw some examples where the splash screen for mdpi was 320x480 at 160 dpi but then the hdpi splash screen was at 480 x 800 at 240. Obviously 480 x 1.5 does not equal 800. Furthermore, after looking at the icons in the android sdk, they only scale up the width and height, not the dpi. Probably because they're icons and don't need to be? Lost in photoshop land....

推荐答案

对于我作为一个移动开发公司的图形设计师,我做了UI的Andr​​oid版在此方面:

For me as a Graphic Artist of a Mobile Development Company, I made UI's for Android in this dimension:

华电国际:640px x 960px在300dpi的75%
优化 MDPI :640px x 960px在300dpi的50%
优化 LDPI :640px x 960px在300dpi的优化,25%

HDPI : 640px x 960px in 300dpi optimized by 75%
MDPI : 640px x 960px in 300dpi optimized by 50%
LDPI : 640px x 960px in 300dpi optimized by 25%

这篇关于安卓:多重图像密度支持 - 规模高度宽度和DPI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆