Android imageview programmatically
<p>How can I make an ImageView appear in the middle of the screen when the user clicks a button? I have placed the image in the res/drawable-folder.</p>

<p>I've been trying with the code below but I don't know how to make the ImageView appear:</p>

<pre><code> View v = new ImageView(getBaseContext());
 ImageView image; 
 image = new ImageView(v.getContext()); 
 image.setImageDrawable(v.getResources().getDrawable(R.drawable.gameover));
</code></pre>

<p>Thanks!</p>
