Clans / FloatingActionButton

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

Can't set set icon for the FloatingActionButton using Vector Drawable? #416

Open EdgeAI-Lab opened 7 years ago

EdgeAI-Lab commented 7 years ago

I want to set icon for the FloatingActionButton using Vector Drawable

<com.github.clans.fab.FloatingActionButton android:layout_width="wrap_content" android:layout_height="wrap_content" fab:srcCompat="@drawable/ic_arrow" fab:fab_size="normal" fab:fab_label="Menu item 1" />

But it is invalid, please tell me how to do, thank you very much!

harshad008 commented 7 years ago

@FanHongchuang add like this..it works android:src="@drawable/ic_arrow"

zenkhas commented 7 years ago

android:src="@drawable/ic_arrow" this does not solve the problem. In 4.4 and below Android versions it causes a crash.

ibrahimbroachwala commented 6 years ago

Is this issue fixed? Vector Drawables are not visible using app:srcCompat.

sadegh-q commented 6 years ago

@ibrahimbroachwala here is the answer: here