图像的GridView是没有得到刷新 [英] gridview of images is not getting refreshed

查看:244
本文介绍了图像的GridView是没有得到刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有从列表填充图像的网格视图。当我从列表中删除图像,我想网格视图得到refreshed.can有人告诉我如何做到这一点。

i have a grid view with images populated from a list. when i remove an image from the list,i want the grid view to get refreshed.can someone tell me how to do this.

我试图无效()在GridView,通知该数据集已更改的图像适配器(adapter.notifyDataSetChanged())。但这不是给予所期望的结果。

i have tried to invalidate() the gridview, notify the image adapter that the data set has changed(adapter.notifyDataSetChanged();). but this is not giving the desired results.

这样做后,我得到一个空白在被去除使用的图像是之前的地方。

after doing this i am getting a blank in the place where the image that is removed used to be before.

推荐答案

您使用ListAdapter来填充你的看法?也许当你的清单改变你应该重新创建一个新的适配器。

Do you use a ListAdapter to populate your view ? Maybe you should recreate a new adapter when your list changes.

这篇关于图像的GridView是没有得到刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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