I use the function setBackgroundResource(R.drawable.image)
a lot.
I have like 7 buttons and want to change the background when one is on focus. Using a selector I guess wouldn't work as the user could tap on an other view and none of my buttons would be on focus.
Problem : I get a OutOfMemoryError here :
but.setBackgroundResource(resIdNew);
current_b_selection.setBackgroundResource(id_res_back);
I think my way to do it is just wrong, but I don't really get what's the good practice here.