Android 棒棒糖中的Fab在长按时显示奇怪的阴影
我正在协调布局中使用浮动操作按钮:Android 棒棒糖中的Fab在长按时显示奇怪的阴影,android,android-layout,shadow,floating-action-button,Android,Android Layout,Shadow,Floating Action Button,我正在协调布局中使用浮动操作按钮: <android.support.design.widget.FloatingActionButton android:id="@+id/fab_add" android:layout_width="wrap_content" android:layout_height="wrap_content" android:tint="@color/white" app:fabSize="normal" app:l
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tint="@color/white"
app:fabSize="normal"
app:layout_anchor="@+id/view_pager_imageformat_carousel"
app:layout_anchorGravity="bottom|end"
app:srcCompat="@drawable/ic_playlist_add_black_24dp"
app:useCompatPadding="true" />
->
我尝试在CoordinatorLayout中将clipChildren设置为false,但没有任何效果,并且查看了其他可用选项,但迄今为止没有成功
是否有人遇到过同样的问题并提出了解决方案?尝试设置高程:
app:elevation="0dp"
尝试设置高程:
app:elevation="0dp"
原来罪犯是
移除它解决了阴影问题
修正我使用的空白
它基本上使用两种不同样式的自定义页边距,默认和用于api 21的ond+
但事实上,这是一个丑陋的解决方案,利润率也不完美,因此我愿意接受更好的解决方案。结果证明,罪魁祸首是
usecompating
移除它解决了阴影问题
修正我使用的空白
它基本上使用两种不同样式的自定义页边距,默认和用于api 21的ond+
但这实际上是一个丑陋的解决方案,而且边距也不完美,因此我愿意接受更好的解决方案。您可以添加
app:rippleColor=“@color/transparent”
将涟漪颜色设置为透明。您可以添加app:rippleColor=“@color/transparent”
将涟漪颜色设置为透明。您使用的支持库版本是什么?我使用的是版本25.3.1您使用的支持库版本是什么?我使用的是版本25.3.1