从右向左滑动 ListView 项显示删除按钮 [英] Swipe ListView item From right to left show delete button

查看:21
本文介绍了从右向左滑动 ListView 项显示删除按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义 ListView,显示从数据库中选择的单词列表.当我滑动此列表视图项时,我想显示如下图所示的删除按钮.当我按下那个按钮时,它会从数据库中删除并刷新列表视图.m

I have a custom ListView showing the list of words selecting from database. When I swipe this listview item i want to show Delete button like image below. And when I press that button it is deleted from Database and refresh the listview. m

我已经查看了这个示例代码 这里.但是还是不行.

I already look in this sample code here. But it still does not work.

推荐答案

在其他选项之间,有一个不错的库可以解决您的问题:https://github.com/daimajia/AndroidSwipeLayout

between other options there's a nice library that could solve your issue: https://github.com/daimajia/AndroidSwipeLayout

这篇关于从右向左滑动 ListView 项显示删除按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆