这是我的XML:
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.instantbits.rippletest.MainActivity"
tools:showIn="@layout/activity_main">
<android.support.v7.widget.AppCompatImageButton
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackgroundBorderless"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_arrow_drop_down_circle_black_24dp"
android:id="@+id/b1"/>
<View
android:id="@+id/view"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginStart="8dp"
android:background="@color/colorAccent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/b1"/>
<android.support.v7.widget.AppCompatImageButton
android:id="@+id/b2"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackgroundBorderless"
app:layout_constraintBottom_toBottomOf="@+id/view"
app:layout_constraintEnd_toEndOf="@+id/view"
app:layout_constraintStart_toStartOf="@+id/view"
app:layout_constraintTop_toTopOf="@+id/view"
app:srcCompat="@drawable/ic_arrow_drop_down_circle_black_24dp"/>
</android.support.constraint.ConstraintLayout>
基本上我有View
背景和ImageButton
。我还有另一个相同的ImageButton
,后面没有View
。没有ImageButton
背后的顶部View
显示涟漪很好。 ImageButton
背后有View
的{{1}}仅显示View
背景外的纹波结束。
我该如何解决这个问题?