Reputation: 3605
I have an Imageview
in which I have to set a background image from my adapter.
Using app:srcCompat
in the xml
code makes the image appear as it should. However, what should I do if I have to do the same thing programmatically?
Upvotes: 0
Views: 644
Reputation: 173
To get the srcCompat effect programmatically on your imageview use the setImageResource method
Upvotes: 1