markormesher / android-fab

Floating action button (FAB) for Android with speed-dial menu functionality
Apache License 2.0
211 stars 29 forks source link

Solution for Vector Drawable support in Android 4.x #50

Closed proninyaroslav closed 4 years ago

proninyaroslav commented 5 years ago

I ran into the problem of using Vector Drawable icons in Android 4.x. As you know, for compatibility with Vector Drawable, the app:srcCompat attribute is used, but it's not supported in this library. I found a solution by enabling AppCompatDelegate.setCompatVectorFromResourcesEnabled(true) in my Activity. This works great and now in Android 4.x I can use Vector Drawable as a FAB icon, and also in a Speed Dial menu.

markormesher commented 4 years ago

Hey @proninyaroslav - thanks for the fix!