FloatingActionButton icon indicating copy to clipboard operation
FloatingActionButton copied to clipboard

The FloatingActionButton can't support the attribute " app:srcCompat"(SVG pictures)

Open sudowanderer opened this issue 7 years ago • 9 comments

Hello, I found a problem when i use this widget, it works well when i set the attribute "android:src",but i want my app support the android 4.4,or more lower with SVG pictures, so i need to use "app:srcCompat", but it doesn't work well;The button just show the background color and it's empty in it. So what should i do?

sudowanderer avatar Mar 29 '17 13:03 sudowanderer

I think, after reading the article you could able to solve the problem with your own. If helped please, close the issue. Thank you.

mirjalal avatar Apr 01 '17 11:04 mirjalal

Any new about this issue ? I need to use a vector for FloatingActionButton ...

Toubap avatar Apr 19 '17 12:04 Toubap

@Toubap please, read my comment above.

mirjalal avatar Apr 19 '17 13:04 mirjalal

I read the article but still no result. The icons don't show on KitKat and below

long1eu avatar Oct 03 '17 20:10 long1eu

What you can do is to set the image resource programmatically with setImageResource

long1eu avatar Oct 04 '17 08:10 long1eu

Works for me "The ‘magic’ way" from the arcticle (comment above)

samosudov avatar Jan 15 '18 17:01 samosudov

@long1eu I tried it with using the 'magic way' and it was worked for me for API 17 lower devices. Try it again if you want or share the non-working piece of the code.

mirjalal avatar Jan 16 '18 19:01 mirjalal

it works, thanks

long1eu avatar Jan 16 '18 19:01 long1eu

glad to hear it ;)

mirjalal avatar Jan 16 '18 19:01 mirjalal