How to get src of image in androids ImageView -


in application need find out source of image in 1 imageview can put same image on imageview. need actual source, , not resource id, because need other actions it.

i tried with:

imageview image = (imageview) view; string src = view2.getdrawable().tostring();

but want returned value like:

some_packages/image.png  

same in c# image.source.tostring(). posible?

sorry english , thank answer.

is posible?

not way going it. imageview not have populated resource. can using sort of drawable. drawable can created either in java code or resource. so, neither imageview nor drawable inside of able tell resource used, there may not such resource.

either:

  • hold onto source somewhere else, or

  • put source in tag of imageview via settag() , retrieve later via gettag()


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -