How to set a PNG file to an ImageView?

Viewed 29932

I have a file called nochart.png in /drawable.

How can I set this to an ImageView?

chartImageView.setImageDrawable(R.drawable.nochart);

Does not compile.

4 Answers

just put your .png file in mipmap folder

Related