1

In android studio I can create a vector image for material icon in black 'ic_save_black_24dp', how can create a image with white background. is there a way I can download material images in white.

here is my vector image

    <vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="#FFFFFF"
        android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z"/>
</vector>

I tried to change the fill color in vector image to '#FFFFFF' but it did not work.

Any suggestions please.

Thanks Rao

BRDroid
  • 3,920
  • 8
  • 65
  • 143
  • 1
    "I tried to change the fill color in vector image to '#FFFFFF' but it did not work" -- it works for me. So, please explain, **in detail**, what "it did not work" means. – CommonsWare Oct 15 '17 at 17:38

2 Answers2

2

I copied your vector xml file and got this:

enter image description here

1

For the specific download of icons you can find then in:

http://material.io/icons

-You can search by name

  • choose one

  • Select color (white or black) and size

  • Click SVG or PNG to download

You get a rar with all variations for densitities, you need to copy the folders directly into your res folder.

As I last I know, generating icons trough AndroidStudio gives a little transparency for the icons, so downloading then is a better option if you dont want this behaviour.

The options is under the right click on drawable folder > New > Image asset.

Marcos Vasconcelos
  • 18,136
  • 30
  • 106
  • 167