浮动操作按钮后面出现灰色加号。我在styles.xml中将colorAccent添加为蓝色。
这是我的布局xml代码: 一个浮动按钮。点击该3个动作按钮展开。
<android.support.design.widget.FloatingActionButton
android:id="@+id/share_btn"
android:layout_width="@dimen/theme_floating_button_min_size"
android:layout_height="@dimen/theme_floating_button_min_size"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/theme_margin_small"
android:layout_marginRight="@dimen/theme_margin_small"
android:layout_marginTop="@dimen/theme_margin_small"
android:src="@drawable/send_icon"
app:backgroundTint="@color/theme_fa_blue" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/add_to_list_btn"
android:layout_width="@dimen/theme_floating_button_min_size"
android:layout_height="@dimen/theme_floating_button_min_size"
android:layout_below="@id/share_btn"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/theme_margin_small"
android:layout_marginRight="@dimen/theme_margin_small"
android:layout_marginTop="@dimen/theme_margin_small"
android:src="@drawable/add_to_list_fa_icon"
app:backgroundTint="@color/theme_fa_blue" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/delete_btn"
android:layout_width="@dimen/theme_floating_button_min_size"
android:layout_height="@dimen/theme_floating_button_min_size"
android:layout_below="@id/add_to_list_btn"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/theme_margin_small"
android:layout_marginRight="@dimen/theme_margin_small"
android:layout_marginTop="@dimen/theme_margin_small"
android:src="@drawable/delete_fa_icon"
app:backgroundTint="@color/theme_fa_blue" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_menu_btn"
android:layout_width="@dimen/theme_floating_button_max_size"
android:layout_height="@dimen/theme_floating_button_max_size"
android:layout_below="@id/delete_btn"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/theme_margin"
android:layout_marginLeft="@dimen/theme_margin"
android:layout_marginRight="@dimen/theme_margin"
android:src="@drawable/more_fa_icon"
app:backgroundTint="@color/theme_fa_blue" />
</RelativeLayout>
提前致谢。