1

I have button design which created using Adobe XD. I want to use this design in my android button. How can do this. I can get this design as an .png or .svg. I don't want the background to deteriorate.

uyarc
  • 579
  • 4
  • 17

1 Answers1

1

It depend how the design looks like in Adobe XD. If your problem is decision how to use resource from XD as background so it will not "deteriorate", you have two options:

  1. PNG: Download resource as .png and add in different sizes to adequate res folders. Documentation about resources on Android. Check part about resouces depending on Screen pixel density
  2. SVG: Download resource as .svg and convert it to .xml in Android Studio to use as Vector Drawable. Then use it as a background of button. Vector Drawable will scale to the different resolutions without quality decrease. enter image description here
Jakub Anioła
  • 310
  • 3
  • 16
  • I use option 2. But image Colors etc are getting up. The picture is distorted. – uyarc May 19 '20 at 10:57
  • @uyarc Some issues with Vector Drawables which might be your problem: - Min api 21 https://stackoverflow.com/questions/34417843/how-to-use-vector-drawables-in-android-api-lower-21 - Distorted Vector Drawable https://stackoverflow.com/questions/36434492/vector-drawable-distorted - Vector Drawable gradients are API 24+ https://stackoverflow.com/questions/40872114/can-gradientcolor-be-used-to-define-a-gradient-for-a-fill-or-stroke-entirely-in – Jakub Anioła May 19 '20 at 11:07