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 -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

Delphi 7 and decode UTF-8 base64 -