ImageButton imgbtn = (ImageButton)findViewById(R.id.imageButton1); imgbtn.setImageResource(R.drawable.actions_record);