从ImageView的机器人取下图像 [英] Remove the image from a imageview Android

查看:130
本文介绍了从ImageView的机器人取下图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使一个的ImageView 保存图像的画廊。通过触摸用户要求加载下一个图像。如果没有找到服务器的下一个图像或需要时间来加载,我需要的旧形象是空的。

I'm trying to make an ImageView that holds a gallery of images. By touching the user request to load the next image. If the next image isn't found in the server or takes time to load I need the old image to be empty.

setVisibility(View.GONE) setVisibility(View.INVISIBLE)不为我工作,因为当无形/走后,我停止 onTouch()检测(和用户被锁定于当前图像)。

setVisibility(View.GONE) or setVisibility(View.INVISIBLE) don't work for me because when invisible/gone I stop the onTouch() detecting (and the user is locked to current image).

我怎样才能让的ImageView 加载一个空的位图或清除(删除)当前位图?

How can I make the ImageView to load a empty bitmap or clear (remove) current bitmap?

推荐答案

我总是用

imageView.setImageDrawable(null);

这篇关于从ImageView的机器人取下图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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