i have matrix of image button, i want to know which one was clicked by their image background. how i get the image button BackgroundResource?
like:
switch (image.getBackgroundResource()) {
case R.mipmap.blueflower
image.setBackgroundResource(R.mipmap.cardback1);
break;
case R.mipmap.cardback1:
image.setBackgroundResource(R.mipmap.blueflower);
break;
}
Thanks