Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
879 views
in Technique[技术] by (71.8m points)

java - How to get Image URL from a ImageView

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...