如何在Android Studio中使用Adobe XD按钮设计?

问题描述 投票:0回答:1

我具有使用Adobe XD创建的按钮设计。我想在我的android按钮中使用此设计。怎么做我可以以.png或.svg的形式获得此设计。我不希望背景恶化。

android xml android-studio svg button
1个回答
0
投票

这取决于设计在Adobe XD中的外观。如果您的问题是决定如何使用XD中的资源作为背景,这样它就不会“恶化”,那么您有两种选择:

  1. PNG:将资源下载为.png并以不同大小添加到适当的res文件夹中。 Documentation about resources on Android。根据Screen pixel density]检查有关资源的部分>
  2. SVG:将资源下载为.svg并将其转换为Android Studio中的.xml以用作Vector Drawable。然后将其用作按钮的背景。可绘制的矢量将缩放到不同的分辨率,而不会降低质量。enter image description here
© www.soinside.com 2019 - 2024. All rights reserved.