android - How to remove FloatingActionButton's surrounding shadow? -


i'm trying replace third party floatingactionbutton the native one packaged in library com.android.support:design:22.2.0.the default has dark shadow around image,how can rid of it? know former 1 provides method setshadow(),but can't find similar 1 latter.

enter image description here

this related xml layout:

<android.support.design.widget.floatingactionbutton         android:id="@+id/alarm_front"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:src="@drawable/btn_icon_alarm_notset" /> 

and have set background color yellow.

malarmbtn.setbackgroundtintlist(colorstatelist.valueof(getresources().getcolor(r.color.floatbuttoncolor))); 

override default elevation of fab adding:

android:elevation="0dp" 

or in code call view.setelevation(float)


Comments