Put a image in Android
<p>i need to show a image, when i press a button on my application.</p>

<p>I'm trying with: </p>

<p><strong>ImageView imageView = (ImageView) findViewById(R.id.imageView2);
 imageView.setImageDrawable(R.drawable.loading);</strong></p>

<p>but it shows an error.</p>

<p>Anyone can help me? Thanks.</p>
