低级视图后面显示的涟漪效果

5
我已经创建了一个列表项(如图所示),其中包括一个 ImageView(美丽的Miranda Kerr)和一个带有背景 selectableItemBackgroundBorderlessImageButton(垃圾桶图标)。

enter image description here

现在,当我点击垃圾桶图标时,涟漪效果会出现ImageView后面。

自然而然地,我希望涟漪效果能够出现在图片前面,在垃圾桶图标后面。

完整的item.xml

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

    <ImageView
        android:id="@+id/image_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:adjustViewBounds="true"
        tools:src="@drawable/cover"
        />

    <ImageButton
        android:id="@+id/trash_image_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="right|bottom"
        android:src="@drawable/translucent_trash"
        android:background="?attr/selectableItemBackgroundBorderless"
        />
</FrameLayout>
1个回答

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接