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) } }

  

Android 滑动删除控件推荐的更多相关文章

  1. Android 中常见控件的介绍和使用

    1 TextView文本框 1.1 TextView类的结构 TextView 是用于显示字符串的组件,对于用户来说就是屏幕中一块用于显示文本的区域.TextView类的层次关系如下: java.la ...

  2. Android 一个日历控件的实现代码

    转载  2017-05-19   作者:Othershe   我要评论 本篇文章主要介绍了Android 一个日历控件的实现代码,小编觉得挺不错的,现在分享给大家,也给大家做个参考.一起跟随小编过来看 ...

  3. Android其它新控件 (转)

    原文出处:http://blog.csdn.net/lavor_zl/article/details/51312715 Android其它新控件是指非Android大版本更新时提出的新控件,也非谷歌I ...

  4. 【转】Android M新控件之AppBarLayout,NavigationView,CoordinatorLayout,CollapsingToolbarLayout的使用

    Android M新控件之AppBarLayout,NavigationView,CoordinatorLayout,CollapsingToolbarLayout的使用 分类: Android UI ...

  5. 【转】Android M新控件之FloatingActionButton,TextInputLayout,Snackbar,TabLayout的使用

    Android M新控件之FloatingActionButton,TextInputLayout,Snackbar,TabLayout的使用 分类: Android UI2015-06-15 16: ...

  6. Android自己定义控件系列五:自己定义绚丽水波纹效果

    尊重原创!转载请注明出处:http://blog.csdn.net/cyp331203/article/details/41114551 今天我们来利用Android自己定义控件实现一个比較有趣的效果 ...

  7. 介绍三个Android支持库控件:TabLayout+ViewPager+RecyclerView

    本文主要介绍如下三个Android支持库控件的配合使用: TabLayout:android.support.design.widget.TabLayout ViewPager:android.sup ...

  8. Android自己定义控件:进度条的四种实现方式

    前三种实现方式代码出自: http://stormzhang.com/openandroid/2013/11/15/android-custom-loading/ (源代码下载)http://down ...

  9. android 自己定义控件

    Android自己定义View实现非常easy 继承View,重写构造函数.onDraw.(onMeasure)等函数. 假设自己定义的View须要有自己定义的属性.须要在values下建立attrs ...

随机推荐

  1. linux(centos8):用grep命令查找文件内容

    一,grep的用途: linux平台有最常用的三大文本处理工具:awk/sed/grep grep的功能:搜索指定文件的内容,按照指定的模式匹配,并输出匹配内容所在的行. 需要注意的地方:grep只支 ...

  2. Ubuntu18.04中安装virtualenv和virtualenvwrapper

    1.安装virtualenv和virtualenvwrapper pip3 install virtualenv pip3 install virtualenvwrapper 2.创建目录用来存放虚拟 ...

  3. 第八章 nginx基础介绍

    一.nginx概述 nginx是一个开源且高性能.可靠的http web服务.代理服务. 开源:直接获取源代码 高性能:支持海量并发 可靠:服务稳定 二.nginx特点 1.高性能高并发 性能高,支持 ...

  4. Typora图片一键传——picgo使用兰空图床

    Typora picgo使用兰空图床 最近smms图床免费版的速度眼看着越来越慢,特别是到晚上,图片几乎是在原地打转,于是我想替换掉Typora中picgo默认使用的smms图床,网上的教程清一色地只 ...

  5. 第六章 类(Class) 和对象(Object)

    一.笔记导图 二.实例代码: public class PrintCarStatus{ public static void main(String[] args){ int speed; Strin ...

  6. cgdb安装

    cgdb官网:http://cgdb.github.io/ 一.cgdb安装 可使用wget命令下载,wget  http://cgdb.me/files/cgdb-0.7.0.tar.gz 之后解压 ...

  7. log4j日志级别怎么搞

    日志的级别之间的大小关系如右所示:ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF Log4j建 ...

  8. 阿里云MNS官方PHP版SDK缺少message tag问题处理

    最近在使用阿里云MNS官方PHP版SDK的过程中,发现发送到topic的消息,不能设置tag(其它语言版本SDK支持tag,如java,python),但在阿里云控制台页面发送是可以设置tag的. 因 ...

  9. H5头部内容

    <head> <meta charset="utf-8"> <title>口袋小鼠</title> <meta name=&q ...

  10. python如何连接数据库操作?

    1.首先导入模块(提前pip安装)  import pymysql ; 2.打开数据库连接   db = pymysql.connect("localhost", "us ...