你对我的图像使用什么分辨率
我正在创建一个包含许多图像按钮的 Android 应用程序。我想通过 Photoshop 创建图像,我应该使用什么分辨率才能使图像在大多数设备上正确显示? 例如,对于网页图像,我们使用 72。
I'm creating an android application that will contain many imageButtons. I want to create images by photoshop, what resolution should I use so images will be displayed correctly in most devices?
For exemple, for web images we use 72.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
DPI 或 PPI 并不重要。基本上,如果您想打印某些内容,就应该关心它。如果您为 Android 应用程序准备图形元素,您应该关心 PNG 的尺寸(以像素 (px) 为单位)。如果您为多个设备进行开发,很可能是这种情况,您应该为不同的屏幕准备不同尺寸的图像。 Google 将屏幕密度概括为 ldpi、mdpi、hdpi、xhdpi。中等密度 (mdpi ~160dpi) 用作基本密度,其他密度从中派生如下:
这基本上意味着如果您有 100x100px 的图像并且您希望该图像在 hdpi 屏幕上看起来不错,您应该以 150x150px abd 保存提供相同的图像在drawable-hdpi目录中。 Android 将完成剩下的工作,并使两个图像在适当的屏幕上看起来相同。
因此,在开始图形设计之前:
在另一方面,谷歌也通用了屏幕尺寸,所以我们有小、正常、大、超大……为了支持不同的尺寸,你应该定义不同的布局以及元素如何在其中定位。
要阅读和了解有关整个内容的更多信息,请尝试查看官方 Android 文档的此链接。
希望你会发现有用的答案;)
享受 Android 仙境..;) 干杯
DPI or PPI it doesn't matter.. Basically u should care about it just if u want to print something. If u prepare graphic elements for Android App u should care about dimensions of PNGs in pixels(px). If u develop for more then one device, which is probably the case u should prepare different size images for different screens. Google generalized screens densities to ldpi, mdpi, hdpi, xhdpi. Medium density (mdpi ~160dpi) is used as base density and others are derived from it as follows:
this basically means if u had image of 100x100px and u want that one to look nice on hdpi screen u should provide same image in 150x150px abd save in drawable-hdpi directory. Android will do the rest and make both images look same on appropriate screen.
So before start with graphics design:
On the other side, Google generalized screen sizes as well so we have small, normal, large, xlarge.. For support different sizes u should define different layouts and how elements will be positioned in them.
To read and learn more about whole thing, try to check this link of official Android documentation.
Hope u will find answer useful ;)
Enjoy Android wonderland.. ;) Cheers
分辨率并不重要,因为它是纯粹的数字媒体。如果您制作 300 像素宽的内容,无论分辨率如何,它都将是 300 像素。该设备具有全局 DPI 设置,您可以向系统查询该设置,但它仅使用该设置来缩放显示图像。不考虑图像的 DPI 设置。
Resolution doesn't matter as it's a purely digital medium. If you make something 300px wide, regardless of the resolution, it'll be 300 pixels. The device has a global DPI setting that you can query the system for, but it just uses that to scale images for the display. The DPI settings of your images are not taken into account.