Skip to content
Advertisement

Android Vector Icon – Add a border

I’m wondering if it may be possible to add a white border to a Android Vector Icon (xml format). I’ve tried to overlap a bigger version of the icon itself, but the result it’s not as I was expecting (as you can see in the attached images).

Is there a way to modify the xml to enlarge a bit the vector itself (e.g.: a couple of pixels) and then use two different colours inside of it?

Without border

Overlap vectors

Advertisement

Answer

Try adding this to your path in the Vector xml

<path ....
    android:strokeColor="#FFFFFF" android:strokeWidth="2"

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement