Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use svg images #108

Open
vikasacharya16 opened this issue Jan 20, 2020 · 2 comments
Open

How to use svg images #108

vikasacharya16 opened this issue Jan 20, 2020 · 2 comments

Comments

@vikasacharya16
Copy link

Is there any way to use SVG images instead of png and icons.

@bradmartin
Copy link
Collaborator

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.

@standevo
Copy link

standevo commented May 31, 2020

@vick16ach Covert svg to font (with icomoon for example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants