【发布时间】:2015-08-17 07:10:05
【问题描述】:
我正在尝试将第三方FloatingActionButton 替换为库com.android.support:design:22.2.0 中打包的the native one。默认外观在图像周围有一个深色阴影,我该如何摆脱它?我知道前者提供了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)));
【问题讨论】:
标签: android shadow floating-action-button