SwipeMenuRecyclerView—仿iOS版微信式列表条目左滑菜单

这篇博客介绍了如何创建一个类似于iOS11风格,但又有细微差异的列表条目左滑菜单,其效果接近于iOS版微信首页的体验。通过自定义itemView的布局文件,你可以轻松实现这个功能。项目源码可在lzls/SwipeMenuRecyclerView找到。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

列表条目左滑显示删除按钮的控件有很多,可以说是已经很常见了,不过下面这种效果的应该不常见,类似iOS11的但又有一点细节的差异,和iOS版微信首页列表的差不多。

SwipeMenuRecyclerView

使用: itemView的布局文件仿照下面即可

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <LinearLayout
        android:id="@+id/itemVisibleFrame"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/default_selector_recycler_item"
        android:focusable="true"
        android:clickable="true">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"</
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值