简体   繁体   English

可绘制尺寸:LDPI,MDPI,HDPI,XHDPI,XXHDPI,XXXHDPI?

[英]Sizes for drawable: LDPI, MDPI, HDPI, XHDPI, XXHDPI, XXXHDPI?

建议可绘制的尺寸是什么:LDPI,MDPI,HDPI,XHDPI,XXHDPI,XXXHDPI或i可以对所有尺寸使用相同尺寸的图像,并以编程方式更改它,例如更改宽度和高度?

Inside Android Studio, if you right click on the res folder, you can select New > Image Asset which will create properly sized drawables for those dpi bucket folders. 在Android Studio中,如果右键单击res文件夹,则可以选择“新建”>“图像资产”,这将为那些dpi存储桶文件夹创建适当大小的可绘制对象。

Optionally, you can also use a website like this one: http://romannurik.github.io/AndroidAssetStudio/index.html 您也可以选择使用类似这样的网站: http : //romannurik.github.io/AndroidAssetStudio/index.html

You can also programmatically change width/height, but this is heavily discouraged due to how disgusting a smaller image looks when it's stretched large. 您还可以通过编程方式更改宽度/高度,但是由于较小的图像在拉伸时会显得令人恶心,因此不建议这样做。 Only use this programmatic solution if you use vector images. 如果使用矢量图像,则仅使用此编程解决方案。

The relationship between the various proportions is as follows: 各个比例之间的关系如下:

LDPI - 0.75x
MDPI - 1.0x (original size)
HDPI - 1.5x
XHDPI - 2.0x
XXHDPI - 3.0x
XXXHDPI - 4.0x

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Android中计算LDPI,MDPI,HDPI,XXHDPI,XXXHDPI的dp - How to calculate dp for LDPI,MDPI,HDPI,XXHDPI,XXXHDPI in android Android Photoshop操作可导出到mdpi hdpi xhdpi xxhdpi和xxxhdpi - Android Photoshop actions to export to mdpi hdpi xhdpi xxhdpi and xxxhdpi 在ldpi,mdpi,hdpi,xhdpi,xxhdpi中自动将sp相互转换 - Convert sp automatically to each other in ldpi, mdpi, hdpi, xhdpi, xxhdpi 如何使用 drawable 兼容所有屏幕尺寸(idpi、mdpi、hdpi、xhdpi、xxhdpi) - how to use drawable to compatible with all screen sizes (idpi, mdpi, hdpi, xhdpi, xxhdpi) 我是否需要使用所有drawable,drawable-mdpi,drawable-hdpi,drawable-xhdpi,drawable-xxhdpi和drawable-xxxhdpi? - Do I need to use all of drawable, drawable-mdpi, drawable-hdpi, drawable-xhdpi, drawable-xxhdpi & drawable-xxxhdpi? 可绘制ldpi / mdpi / hdpi / xhdpi文件夹的最佳位图大小是多少? - What is the optimal bitmap size for drawable ldpi / mdpi / hdpi / xhdpi folders? 图像大小(drawable-hdpi/ldpi/mdpi/xhdpi) - image size (drawable-hdpi/ldpi/mdpi/xhdpi) 379x379px图像的Android mdpi,hdpi,xhdpi,xxhdpi和xxxhdpi像素? - Android mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi in pixels for 379x379px image? 有没有办法从大型图像创建 xxhdpi、xhdpi、hdpi、mdpi 和 ldpi 可绘制对象? - Is there a way to create xxhdpi, xhdpi, hdpi, mdpi and ldpi drawables from a large scale image? 其中drawable-hdpi,drawable-mdpi,drawable-xhdpi和drawable-xxhdpi。 走? - where drawable-hdpi ,drawable-mdpi ,drawable-xhdpi and drawable-xxhdpi. go?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM