if (image.getDrawable().getConstantState().equals(getResources().getDrawable(0).getConstantState())){
image.setVisibility(View.GONE);
}else{
image.setVisibility(View.VISIBLE);
}
That is, if image has not any drawable, image will be GONE, else Visible. But this code does not work