// change the image for ImageView ImageView image = (ImageView) findViewById(R.id.test_image); image.setImageResource(R.drawable.xxx);