我正在尝试将第三方FloatingActionButton替换为库中打包的本机com.android.support:design:22.2.0
按钮。默认外观在图像周围有一个深色阴影,我该如何摆脱它?我知道前者提供了该方法setShadow()
,但我无法从后者中找到类似的方法。
这是相关的 XML 布局:
<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" />
我已将其背景颜色设置为黄色。
mAlarmBtn.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.floatButtonColor)));