如何在单击按钮时从自定义列表视图中隐藏项目? [英] How to hide an item from custom list view on button click?

查看:49
本文介绍了如何在单击按钮时从自定义列表视图中隐藏项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有自定义列表视图,在该视图中我想隐藏按钮单击事件中的项目.对于每个项目,它们都是一个按钮,一旦单击它,应将其删除或删除.
请对此提供帮助.
谢谢.

I have custom list view where I want to hide items on a button click event. For every item their is a button and once it is clicked it should be deleted or removed.
Please help regarding this.
Thank you.

推荐答案

^ ]
http://wptrafficanalyzer.in/blog/deleting-selected-items-from-listview -in-android/ [ ^ ]
http://www.mail-archive.com/android-developers@googlegroups.com/msg202454.html [ ^ ]
http://stackoverflow.com/questions/5497580/how-to-dynamically-remove-items-from-listview-on-a-button-click[^]
http://wptrafficanalyzer.in/blog/deleting-selected-items-from-listview-in-android/[^]
http://www.mail-archive.com/android-developers@googlegroups.com/msg202454.html[^]
http://androidzoo.wordpress.com/2011/10/28/working-with-listview-in-android-customize-listview-add-item-via-a-button-click-and-also-clickable-each-button-in-each-row/[^]


要从自定义列表视图中删除项目,只需使用此代码即可.


To remove an item from custom list view simply use this code..



CustomListAdapter.this._list.remove(pos);

 CustomListAdapter.this.notifyDataSetChanged();


这篇关于如何在单击按钮时从自定义列表视图中隐藏项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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