Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 648
Davide3i Avatar asked Jun 30 '16 20:06

Davide3i


1 Answers

Try adding this to your path in the Vector xml

<path ....
    android:strokeColor="#FFFFFF" android:strokeWidth="2"
like image 57
Siddhesh Dighe Avatar answered Sep 21 '22 16:09

Siddhesh Dighe