Clans / FloatingActionButton

Android Floating Action Button based on Material Design specification
Apache License 2.0
5.22k stars 1.13k forks source link

android:tint color not applied #262

Open Malrok opened 8 years ago

Malrok commented 8 years ago

I am using VectorDrawables in my application, and apply a tint to them (via android:tint) However, although the VectorDrawable works, the tint is not applied when in a FloatingActionButton

 <com.github.clans.fab.FloatingActionButton
        android:id="@+id/menu_item"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:tint="@color/lightGrey"
        android:src="@drawable/alarm_plus"
        app:fab_size="mini"
        app:fab_label="@string/add_alarm"/>
thamer898 commented 8 years ago

@Malrok yes i have the same problem .

jamieomatthews commented 8 years ago

Came here to open the same issue!!!

akherbst2 commented 8 years ago

It worked for me when I hard-coded in the color!

i.e.

android tint="#E0E0E0"

akherbst2 commented 8 years ago

For some reason, the button didn't "update" the color when I just added a reference to a color (android:tint="@color/lightGrey"). I found the raw color worked, like in above example. Very strange.

LOG-TAG commented 8 years ago

this bug fix is must in this VectorDrawable world !

timothyolt commented 7 years ago

I too have this problem, though it seems that only the mini buttons are affected.