3

Can I use vector graphics in Android? I have to vector images, how can i use it as application icon and how can I connect it to ImageView in Android?

user3465378
  • 103
  • 2
  • 6
  • You can SVG images, but you need a 3rd party (free) library. App icons can't be vectorial by definition. All the SVG libraries provide methods to read the xml from the SVG files and make a bitmap out of it. – Phantômaxx May 26 '14 at 13:57
  • 1
    Actual info on how to use appcompat vectors - http://stackoverflow.com/q/40678947/7045114 – Maksim Ostrovidov Nov 21 '16 at 00:19

2 Answers2

1

From Android 5.0 (API level 21) you can use vector drawable in your app. You can use new Android Studio tool called: Vector Asset Studio. See link below for a complete explanation:

Vector Asset Studio

  • When answering with just a link, you should provide brief explanation *in the answer*, because if link happened to be broken, your answer would lost its value and most likely would be downvoted and deleted. – Timofey Nov 29 '15 at 14:41
0

There is "svg-android" for svg files support for Android, but not native. I don't think you can use it as application icon.

Latest source code: https://github.com/pents90/svg-android

Documentation: https://code.google.com/p/svg-android/

Marta Rodriguez
  • 1,944
  • 2
  • 16
  • 30