勇敢直面人生

伟大的成绩和辛勤的劳动是成正比例的,有一分劳动就有一份收获,日积月累,从少到多,奇迹就可以创造出来

Android 滑动删除控件推荐

implementation 'com.github.mcxtzhang:SwipeDelMenuLayout:V1.3.0'

  

 

<?xml version="1.0" encoding="utf-8"?>
<com.mcxtzhang.swipemenulib.SwipeMenuLayout android:layout_height="wrap_content"
    android:layout_width="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:clickable="true"
    android:focusable="true"
    android:paddingBottom="1dp"
    app:ios="false"
    app:leftSwipe="true"
    app:swipeEnable="true"
    xmlns:android="http://schemas.android.com/apk/res/android">
    <自己的布局/>
    <Button
        android:id="@+id/btnDelete"
        android:layout_width="@dimen/dp_80"
        android:layout_height="match_parent"
        android:background="@color/red"
        android:text="删除"
        android:textColor="@android:color/white"/>
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>

  使用方法:

 

btnDelete.setOnClickListener {
                DialogModel.showSelectDialog("提示", "删除后该转货单不可恢复也不可进行出发到达操作", confirmText = "确定", cancelAble = true) {
                        list.removeAt(position)
                        notifyItemRemoved(position)


                }

            }

  

 

posted on 2020-11-23 09:39  想像你那么优秀  阅读(431)  评论(0编辑  收藏  举报

导航