Imagebutton change programmatically?
Try this its working for me,Change the background image programmatically,
image.setBackgroundResource(R.drawable.ico);
your code is trying to change the background of the button. not its image. Those are two different things
((ImageButton) view).setImageResource(R.drawable.icon2);