DragListView:仿ios,仿qq实现Listview侧滑出现按钮-源码

上传者: 42116847 | 上传时间: 2021-06-08 18:05:04 | 文件大小: 1.83MB | 文件类型: ZIP
DragListView 仿ios,仿qq实现Listview侧滑出现按钮 这个代码很常见,网上大牛已经做过好几遍了,但是本着学习的态度,去研究了下别人写的代码。发现有好几种实现方法。最为流行的一种是使用Scroller实现滑动,然后按钮的实现有三种方法。 一种是全部用java类继承一个viewgroup来动态生成listviewitem.这样灵活性很高,但是技巧性也高。 一种是整个listviewitem用xml编写,然后inflate进去。这样写的好处是可以复用,而且只需要adapter重写view, 但是按钮和内容是固定的,不能轻松的实现QQ好友那种,有时候是删除,有时候是置顶,有时候是标记什么的、多种按钮结合 为此我试着把基本listviewitem和按钮xml分开写,写成2个布局,然后用一个linerlayout动态合成起来。这样在扩展的时候可以写多组按钮布局,然后动态判断合成,

文件下载

资源详情

[{"title":"( 51 个子文件 1.83MB ) DragListView:仿ios,仿qq实现Listview侧滑出现按钮-源码","children":[{"title":"DragListView-master","children":[{"title":"AndroidManifest.xml <span style='color:#111;'> 783B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"layout","children":[{"title":"activity_list.xml <span style='color:#111;'> 449B </span>","children":null,"spread":false},{"title":"swipemenu.xml <span style='color:#111;'> 885B </span>","children":null,"spread":false},{"title":"swipecontent <span style='color:#111;'> 807B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 5.11KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-v11","children":[{"title":"styles.xml <span style='color:#111;'> 324B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 9.18KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 14.05KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-v14","children":[{"title":"styles.xml <span style='color:#111;'> 381B </span>","children":null,"spread":false}],"spread":true},{"title":"values","children":[{"title":"strings.xml <span style='color:#111;'> 73B </span>","children":null,"spread":false},{"title":"styles.xml <span style='color:#111;'> 680B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"src","children":[{"title":"com","children":[{"title":"draglistview","children":[{"title":"MainActivity.java <span style='color:#111;'> 2.73KB </span>","children":null,"spread":false},{"title":"DragDelListView.java <span style='color:#111;'> 2.60KB </span>","children":null,"spread":false},{"title":"DragDelItem.java <span style='color:#111;'> 3.46KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"proguard-project.txt <span style='color:#111;'> 781B </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"classes","children":[{"title":"com","children":[{"title":"draglistview","children":[{"title":"BuildConfig.class <span style='color:#111;'> 341B </span>","children":null,"spread":false},{"title":"MainActivity$AppAdapter.class <span style='color:#111;'> 3.44KB </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 563B </span>","children":null,"spread":false},{"title":"MainActivity.class <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false},{"title":"R$layout.class <span style='color:#111;'> 466B </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 334B </span>","children":null,"spread":false},{"title":"R$style.class <span style='color:#111;'> 425B </span>","children":null,"spread":false},{"title":"MainActivity$AppAdapter$ViewHolder.class <span style='color:#111;'> 1.09KB </span>","children":null,"spread":false},{"title":"R$id.class <span style='color:#111;'> 503B </span>","children":null,"spread":false},{"title":"DragDelItem.class <span style='color:#111;'> 3.43KB </span>","children":null,"spread":false},{"title":"R$string.class <span style='color:#111;'> 392B </span>","children":null,"spread":false},{"title":"MainActivity$AppAdapter$2.class <span style='color:#111;'> 915B </span>","children":null,"spread":false},{"title":"MainActivity$AppAdapter$1.class <span style='color:#111;'> 1.37KB </span>","children":null,"spread":false},{"title":"DragDelListView.class <span style='color:#111;'> 2.85KB </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 401B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"dexedLibs","children":[{"title":"android-support-v4-f2138520cc3f8c1dc479869e1deb0b26.jar <span style='color:#111;'> 267.37KB </span>","children":null,"spread":false},{"title":"android-support-v4-f51510faff51f267e26abf1c9d481786.jar <span style='color:#111;'> 267.37KB </span>","children":null,"spread":false}],"spread":true},{"title":"AndroidManifest.xml <span style='color:#111;'> 783B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"crunch","children":[{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 4.94KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 8.98KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 13.74KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"jarlist.cache <span style='color:#111;'> 120B </span>","children":null,"spread":false},{"title":"R.txt <span style='color:#111;'> 364B </span>","children":null,"spread":false},{"title":"classes.dex <span style='color:#111;'> 805.75KB </span>","children":null,"spread":false},{"title":"draglistview.jar <span style='color:#111;'> 7.63KB </span>","children":null,"spread":false},{"title":"resources.ap_ <span style='color:#111;'> 32.43KB </span>","children":null,"spread":false},{"title":"DragListView.apk <span style='color:#111;'> 306.19KB </span>","children":null,"spread":false},{"title":"swipemenulistview.jar <span style='color:#111;'> 4.45KB </span>","children":null,"spread":false}],"spread":false},{"title":".classpath <span style='color:#111;'> 466B </span>","children":null,"spread":false},{"title":"project.properties <span style='color:#111;'> 585B </span>","children":null,"spread":false},{"title":".settings","children":[{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 173B </span>","children":null,"spread":false}],"spread":true},{"title":"libs","children":[{"title":"android-support-v4.jar <span style='color:#111;'> 740.94KB </span>","children":null,"spread":false}],"spread":true},{"title":"README.md <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false},{"title":".project <span style='color:#111;'> 815B </span>","children":null,"spread":false},{"title":"gen","children":[{"title":"com","children":[{"title":"draglistview","children":[{"title":"R.java <span style='color:#111;'> 2.04KB </span>","children":null,"spread":false},{"title":"BuildConfig.java <span style='color:#111;'> 158B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明