Сравнить Drawable у двух ImageView:Drawable first = imageViewFirst.getDrawable();
Drawable second = imageViewSecond.getDrawable();
Drawable.ConstantState stateFirst = first.getConstantState();
Drawable.ConstantState stateSecond = second.getConstantState();
if(stateFirst.equals(stateSecond)) {
// ваш код
}
Edit:Сравнить Drawable у ImageView и Drawable из ресурсов:Drawable imageViewDrawable = imageViewFirst.getDrawable();
Drawable.ConstantState imageViewDrawableState =imageViewDrawable.getConstantState();
Drawable fromResourcesDrawable = getResources().getDrawable(R.drawable.my_drawable);// ваш ресурс
Drawable.ConstantState fromResourcesState = fromResourcesDrawable.getConstantState();
if(imageViewDrawable.equals(fromResourcesState)) {
// ваш код
}