android - Android 中不同布局尺寸的最佳图像尺寸

标签 android image android-layout

Android 中 ldpi、mdpi、hdpi 和 xhdpi 密度的最佳尺寸图像是什么?

我问是因为我没有找到任何关于每种密度的完美图像尺寸的主题。

比如Medium Density是320X480, 480X800, 480X854, 1280X800, etc..知道我需要根据更高的尺寸绘制图像吗?

最佳答案

To create alternative bitmap drawables for different densities, you should follow the 3:4:6:8 scaling ratio between the four generalized densities. For example, if you have a bitmap drawable that's 48x48 pixels for medium-density screen (the size for a launcher icon), all the different sizes should be:

  • 36x36 for low-density
  • 48x48 for medium-density
  • 72x72 for high-density
  • 96x96 for extra high-density

来自 http://developer.android.com/guide/practices/screens_support.html

希望对您有所帮助:-)

关于android - Android 中不同布局尺寸的最佳图像尺寸,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9503649/

相关文章:

android - 将项目转换为模块后 Gradle 失败

android - 如何使用 3.x.x Gradle 插件在 Android Studio 中选择模块的风格

javascript - 三.js设置背景图片

android - statusBar 颜色与我的 colorPrimaryDark 颜色不同

android - 如何处理 Android 应用程序中主页按钮的 KeyEvent?

android - 更改工具栏未隐藏菜单图标颜色

python - pygame.error : SavePNG: could not open for writing?

css - CSS `content` 属性如何用于 WebKit 中的 `img` 元素?

android expandablelistview如何设置组项目之间的空间

android - 以编程方式将 TableRow 添加到 TableLayout 不起作用