简体   繁体   English

如何在不同手机的android studio中获得相同的图像大小

[英]how to get same image size in android studio for different phone

I want to have a image (0.5in*0.5in) for my game for all devices but image size changes for different device.我想为所有设备的游戏制作一个图像(0.5 英寸 * 0.5 英寸),但不同设备的图像大小会发生变化。 I used 0.5in( not dp) as layout width and layout height.I am working on android studio 2.3.3我使用 0.5in(不是 dp)作为布局宽度和布局高度。我正在使用 android studio 2.3.3

for different Android devices, Android deal with Images with different densities with these standards mdpi:hdpi:xhdpi:xxhdpi:xxxhdpi, there are many ways to convert your Images to these standards and it's boring to use photoshop to do that so these links will help you to change the size of your Images easily.对于不同的 Android 设备,Android 使用这些标准处理具有不同密度的图像 mdpi:hdpi:xhdpi:xxhdpi:xxxhdpi,有很多方法可以将您的图像转换为这些标准,而使用 photoshop 这样做很无聊,因此这些链接将有所帮助您可以轻松更改图像的大小。 https://romannurik.github.io/AndroidAssetStudio/nine-patches.html#&sourceDensity=320&name=example https://romannurik.github.io/AndroidAssetStudio/nine-patches.html#&sourceDensity=320&name=example

and https://github.com/leocadiotine/fred this one is awesomehttps://github.com/leocadiotine/fred这个很棒

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM