我创建了一个列表项(如图所示),其中包含ImageView(美丽的米兰达·可儿)和ImageButton带有背景的(垃圾图标)selectableItemBackgroundBorderless。
现在,当我单击垃圾桶图标时,会在垃圾箱后面创建波纹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>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
405 次 |
| 最近记录: |