i want to check if a Imageview has a specific R.drawable and if so change it with another image. But it does not work this way.
xml code
<ImageView
android:id="@+id/Picture"
android:src="@drawable/apicture"
</ImageView>
java code
Image = (ImageView) findViewById(R.id.Picture);
public void coolMethod()
{
if(Image.equals(R.drawable.apicture){
Image.setImageResource(R.drawable.anotherpicture);
}
}