I need to put my own image on some imageView. So that’s why I created folder named “drawable” in res folder , and copy my Image in this folder , but now I don’t know how to set this image to my imageView in XML code. Can anybody help? and sorry for English 🙂
I need to put my own image on some imageView . So that’s why
Share
In your layout XML file:
Replace
your_image_namewith the name of the image file without the extension (e.g. if your drawable file is calledimg1.png, thesrcattribute should have a value of@drawable/img1).