android listview长按子项动态添加自定义view

上传者: soonlen | 上传时间: 2021-07-02 15:17:23 | 文件大小: 1.27MB | 文件类型: RAR
在做项目中碰见一个在listview子项里面长按,会显示不定数量的控件出来,于是我通过添加自定义view来实现,当然也可以通过listview动态添加gridview来实现.功能说明,长按显示新添加上去的自定义view,点击中间的自定义view会提示点击了它,长按其它的item,前面显示的会消失。

文件下载

资源详情

( 52 个子文件 1.27MB ) android listview长按子项动态添加自定义view
TestView
bin
classes.dex 613.61KB
TestView.apk 252.76KB
res
drawable-hdpi
ic_launcher.png 5.82KB
drawable-xhdpi
ic_launcher.png 9.14KB
drawable-xxhdpi
ic_launcher.png 17.47KB
drawable-mdpi
ic_launcher.png 3.04KB
dexedLibs
android-support-v4-6b5a8d7af6a45434ff8d658618b80a0b.jar 206.37KB
classes
com
example
testview
MainActivity.class 2.17KB
BuildConfig.class 349B
MainActivity$1.class 1.36KB
R$layout.class 446B
R$id.class 477B
R$drawable.class 413B
R$dimen.class 467B
R$attr.class 346B
R$menu.class 394B
MyListviewAdapter.class 3.49KB
R.class 693B
MyListviewAdapter$1.class 1.31KB
R$string.class 478B
MyView.class 2.00KB
R$style.class 437B
MyListviewAdapter$MyViewHolder.class 641B
resources.ap_ 40.57KB
AndroidManifest.xml 882B
res
drawable-ldpi
values-v11
styles.xml 334B
menu
main.xml 263B
values-v14
styles.xml 391B
drawable-hdpi
ic_launcher.png 7.48KB
drawable-xhdpi
ic_launcher.png 12.22KB
drawable-xxhdpi
ic_launcher.png 24.20KB
values
strings.xml 225B
styles.xml 697B
dimens.xml 220B
values-sw720dp-land
dimens.xml 277B
drawable-mdpi
ic_launcher.png 3.69KB
values-sw600dp
dimens.xml 203B
layout
listview_item.xml 790B
activity_main.xml 801B
proguard-project.txt 781B
ic_launcher-web.png 50.19KB
assets
gen
com
example
testview
BuildConfig.java 162B
R.java 2.63KB
.settings
org.eclipse.jdt.core.prefs 177B
src
com
example
testview
MyView.java 1.49KB
MyListviewAdapter.java 2.26KB
MainActivity.java 1.90KB
.project 844B
.classpath 475B
project.properties 563B
AndroidManifest.xml 882B
libs
android-support-v4.jar 543.16KB
[{"title":"( 52 个子文件 1.27MB ) android listview长按子项动态添加自定义view","children":[{"title":"TestView","children":[{"title":"bin","children":[{"title":"classes.dex <span style='color:#111;'> 613.61KB </span>","children":null,"spread":false},{"title":"TestView.apk <span style='color:#111;'> 252.76KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 5.82KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 9.14KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 17.47KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.04KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"dexedLibs","children":[{"title":"android-support-v4-6b5a8d7af6a45434ff8d658618b80a0b.jar <span style='color:#111;'> 206.37KB </span>","children":null,"spread":false}],"spread":true},{"title":"classes","children":[{"title":"com","children":[{"title":"example","children":[{"title":"testview","children":[{"title":"MainActivity.class <span style='color:#111;'> 2.17KB </span>","children":null,"spread":false},{"title":"BuildConfig.class <span style='color:#111;'> 349B </span>","children":null,"spread":false},{"title":"MainActivity$1.class <span style='color:#111;'> 1.36KB </span>","children":null,"spread":false},{"title":"R$layout.class <span style='color:#111;'> 446B </span>","children":null,"spread":false},{"title":"R$id.class <span style='color:#111;'> 477B </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 413B </span>","children":null,"spread":false},{"title":"R$dimen.class <span style='color:#111;'> 467B </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 346B </span>","children":null,"spread":false},{"title":"R$menu.class <span style='color:#111;'> 394B </span>","children":null,"spread":false},{"title":"MyListviewAdapter.class <span style='color:#111;'> 3.49KB </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 693B </span>","children":null,"spread":false},{"title":"MyListviewAdapter$1.class <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false},{"title":"R$string.class <span style='color:#111;'> 478B </span>","children":null,"spread":false},{"title":"MyView.class <span style='color:#111;'> 2.00KB </span>","children":null,"spread":false},{"title":"R$style.class <span style='color:#111;'> 437B </span>","children":null,"spread":false},{"title":"MyListviewAdapter$MyViewHolder.class <span style='color:#111;'> 641B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"resources.ap_ <span style='color:#111;'> 40.57KB </span>","children":null,"spread":false},{"title":"AndroidManifest.xml <span style='color:#111;'> 882B </span>","children":null,"spread":false}],"spread":true},{"title":"res","children":[{"title":"drawable-ldpi","children":null,"spread":false},{"title":"values-v11","children":[{"title":"styles.xml <span style='color:#111;'> 334B </span>","children":null,"spread":false}],"spread":true},{"title":"menu","children":[{"title":"main.xml <span style='color:#111;'> 263B </span>","children":null,"spread":false}],"spread":true},{"title":"values-v14","children":[{"title":"styles.xml <span style='color:#111;'> 391B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 7.48KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 12.22KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 24.20KB </span>","children":null,"spread":false}],"spread":true},{"title":"values","children":[{"title":"strings.xml <span style='color:#111;'> 225B </span>","children":null,"spread":false},{"title":"styles.xml <span style='color:#111;'> 697B </span>","children":null,"spread":false},{"title":"dimens.xml <span style='color:#111;'> 220B </span>","children":null,"spread":false}],"spread":true},{"title":"values-sw720dp-land","children":[{"title":"dimens.xml <span style='color:#111;'> 277B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.69KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-sw600dp","children":[{"title":"dimens.xml <span style='color:#111;'> 203B </span>","children":null,"spread":false}],"spread":true},{"title":"layout","children":[{"title":"listview_item.xml <span style='color:#111;'> 790B </span>","children":null,"spread":false},{"title":"activity_main.xml <span style='color:#111;'> 801B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"proguard-project.txt <span style='color:#111;'> 781B </span>","children":null,"spread":false},{"title":"ic_launcher-web.png <span style='color:#111;'> 50.19KB </span>","children":null,"spread":false},{"title":"assets","children":null,"spread":false},{"title":"gen","children":[{"title":"com","children":[{"title":"example","children":[{"title":"testview","children":[{"title":"BuildConfig.java <span style='color:#111;'> 162B </span>","children":null,"spread":false},{"title":"R.java <span style='color:#111;'> 2.63KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".settings","children":[{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 177B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"com","children":[{"title":"example","children":[{"title":"testview","children":[{"title":"MyView.java <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"MyListviewAdapter.java <span style='color:#111;'> 2.26KB </span>","children":null,"spread":false},{"title":"MainActivity.java <span style='color:#111;'> 1.90KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 844B </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 475B </span>","children":null,"spread":false},{"title":"project.properties <span style='color:#111;'> 563B </span>","children":null,"spread":false},{"title":"AndroidManifest.xml <span style='color:#111;'> 882B </span>","children":null,"spread":false},{"title":"libs","children":[{"title":"android-support-v4.jar <span style='color:#111;'> 543.16KB </span>","children":null,"spread":false}],"spread":true}],"spread":false}],"spread":true}]

评论信息

  • alert_java_song :
    有效果图嘛
    2018-01-06
  • yihu0817 :
    感谢分享,非常实用.
    2016-01-15
  • ww5418ww :
    非常实用 感谢分享。
    2015-09-09
  • todaysjc :
    挺好的,很实用
    2015-08-20
  • zh711125 :
    挺实用的,挺好的
    2015-04-07

免责申明

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