如何从ImageView获取图像URL [英] How to get Image URL from a ImageView

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

问题描述

我不知道如何从已经解决的 ImageView 获取图像URL .实际上,我有一个 ImageView ,该图片是通过 URL 设置的.现在,在该 button_clik 上有一个 button ,我必须获取该 ImageView URL .有可能吗?预先感谢.

I have no idea how to get an Image URL from already settled ImageView. Actually, I have an ImageView over which picture is set from a URL. Now I have a button on that button_clik I have to fetch that ImageView URL. Is it possible or not ? Thanks in advance.

推荐答案

您无法从imageview获取图片网址...事实上,您将不得不使用备用网址.例如,您可能将imageview的网址保存在某个数组中...您需要获取被单击的imageview的位置,并使用该位置可以获取被点击的图像的url ...如果您使用listview/gridview来获取它获取位置非常容易,但是如果没有,您可以将pos设置为图像标签,然后检索将指定位置的标签.

u cannot get the image url from the imageview...infact u will have to use the alternate. For example u might be saving the urls for the imageview in some array...u need to get the position of the imageview clicked and using that position u can get the url of the clicked image...if u r using listview/gridview it is very easy to get the position but if not, u can set the pos as tag of image and retrieve the tag that will specify the position.

如果您需要帮助,请随时询问...

if u need help feel free to ask...

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

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