gpt4 book ai didi

android - 是否有使用 Android Studio 添加不是图标的可绘制对象的内置方法?

转载 作者:太空狗 更新时间:2023-10-29 13:50:13 24 4
gpt4 key购买 nike

我知道我可以右键单击 res 文件夹,选择“新建 > 图像 Assets ”,但虽然它允许我选择添加图标的类型,但它假设我想添加一个图标。

我知道我可以手动生成图像并将它们移动到 drawble-mdpi、drawable-hdpi、drawable-xhdpi,但我认为可以自动化它并提供将缩放以创建较低分辨率版本的单个图像.

我知道 Fast ways to import drawables in Android Studio?但它不限于内置选项,可接受的版本是 plugin that received last update in 2016似乎是 no longer maintained - NullPointerException report received no response from maintainer .

最佳答案

不幸的是,在发布和创建赏金之后,我发现它已经被要求为 Is there a way to create xxhdpi, xhdpi, hdpi, mdpi and ldpi drawables from a large scale image?

因此Is there a way to create xxhdpi, xhdpi, hdpi, mdpi and ldpi drawables from a large scale image?下面引用了一些有用的选项:

选项 #1:只需发送 -xxhdpi 可绘制对象并让 Android 在运行时为您对它们进行下采样(缺点:仅适用于较新的设备,其中 -xxhdpi是已知的)。

选项 #2:根据 ssantos 的回答,在图形编辑器中自动化该过程。

选项 #3:使用 ImageMagick 之类的工具为自己编写一个解决方案

(CommonsWare 的回答)

我遵循选项 #3

关于android - 是否有使用 Android Studio 添加不是图标的可绘制对象的内置方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48986907/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com