3
Guys, here’s the thing... I wonder how I see if the file that this set in the Imagebutton is equal to such drawable.
To make it easier I’d like to do something like this:
final ImageButton imgBt = (ImageButton) findViewById(R.id.ImageSelect);
if(imgBt.getDrawable() == R.drawable.circle_blue) {
//Executar Codigo
}
But then it’s not right... someone could help me?
Jeiferson, I don’t think that’s possible, maybe there’s a way. But by making a subclass of
ImageButton
for example that you know theid
of Drawable would be fine, take a look at that answer to see if it helps you find the way: http://answall.com/questions/38283/como-pega-id-de-um-imageview-no-android/38311#38311– Wakim