nativescript-floatingactionbutton
nativescript-floatingactionbutton copied to clipboard
How to use svg images
Is there any way to use SVG images instead of png and icons.
I don't believe the native Android widget supports SVGs by default. So the usage of the native widget would need to be extended/customized to add support for SVG as the icons of the FAB.
Quick look at the docs: https://developer.android.com/reference/com/google/android/material/floatingactionbutton/FloatingActionButton.html#setImageDrawable(android.graphics.drawable.Drawable) looks like a Drawable is accepted and android has the VectorDrawable
which extends Drawable
so it might be possible to actually pass an instance of VectorDrawable
to the method inside the plugin.
I'll mark this as an enhancement because it will require checking for SVG and then creating a VectorDrawable
from the resource and then passing to the method.
@vick16ach Covert svg to font (with icomoon for example)