Android Question [SOLVED] - Accessing the Image File property of Drawable in code for an ImageView

rleiman

Well-Known Member
Licensed User
Longtime User
Greetings,

In the designer, I placed an ImageView on my layout. The Drawable property has another property called Image File. When I typed the name of my ImageView defined in Globals in my coding, I followed it by a full stop, the auto-complete was displayed. In the list, I looked for Drawable and did not find it. Same problem for Image File. It wasn't listed either. How do I access this property in code?

The purpose of wanting this property is to test what image file is assigned to my ImageView because throughout the app that ImageView gets loaded with different images files. I know I've seen coding where the tag property of the ImageView is used to hold the name of the image file, but just wanted to know if I could just use the Image File property.

Thanks.
 
Top