You can just get the Drawable integer on Drawable beforeClickDrawalbe=view.getBackground();
and change the background of your view by doing: view.setBackgroundDrawable(getResources().getDrawable(R.drawable.YOUR_DRAWABLE));
and then, if you want to return it to its original background, you do not need an identifier because you have the whole Drawable like this: view.setBackgroundDrawable(beforeClickDrawalbe));
What all!
source share