【发布时间】:2016-06-01 01:01:01
【问题描述】:
我正在使用 compile 'com.android.support:design:23.1.1' 和 android.support.design.widget.FloatingActionButton 创建 FAB。
当背景色调为白色时,高度(阴影)非常明显。
但对于其他颜色,海拔不可见。
这是我的代码:
<android.support.design.widget.FloatingActionButton
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/create_floating_button"
app:elevation="6dp"
app:borderWidth="0dp"
android:clickable="true"
app:backgroundTint="@color/colorAccent"
app:rippleColor="@color/colorAccentLight"
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
除了这个问题,即使是白色,按钮看起来也不像google material design spec 中的按钮。
例如检查这个(阴影的方向向下):
我做错了什么?
【问题讨论】:
标签: android android-support-design floating-action-button