拆下的ListView选中的项目 [英] Remove selected item from ListView

查看:70
本文介绍了拆下的ListView选中的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想删除从的ListView 选定的项目,但我不能。我已经尝试了很多方法,但他们没有为我工作。

I want to delete the selected item from the ListView but I can't. I've tried a lot of methods but they aren't working for me.

这是我的适配器列表 - 项目从SD卡来了。

This is my adapter list- items are coming from the SD Card.

ArrayAdapter<String> adapter = new ArrayAdapter<String>(
                        FindFilesByType.this, android.R.layout.test_list_item,
                        Ringtones); 

我该如何解决这个问题?

How do I solve this problem?

推荐答案

您可以从下面的列表中删除的项和信号适配器,该数据集已经改变了。

You can remove the item from the underlying list and signal the adapter, that the dataset has changed.

看一看<一href="https://github.com/pilhuhn/ZwitscherA/blob/8fae44ccf4043d40d569c40f8b5dac23ed677e56/src/de/bsd/zwitscher/$p$pferences/ExpandableList$p$pference.java#L117"相对=nofollow>这个方法一个例子。

这篇关于拆下的ListView选中的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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