That's my problem...:
In my work I have ImageViewand Button. I want the button to perform the action ONLY when it ImageViewdisplays a specific value. And yes, that means it ImageViewanimates between different drawings that are encoded in such a way that they don't interrupt what I want to do.
ImageView imgview = (ImageView)findViewById(R.id.imgviewsid);
Resources res = getResources();
Drawable acertaindrawable = res.getDrawable(R.drawable.thecertaindrawable);
Drawable variabledrawable = imgview.getDrawable();
if (variabledrawable == acertaindrawable)
{
//does something
}
This did not work. And I narrowed it down because of the line "if (variabledrawable == acertaindrawable)". While Eclipse does not secretly report errors that Android cannot recognize if the two drawings are the same, I tested other areas of the code and everything seems to work fine.