{
dialog.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);
dialogCache.getProductNameInputLayout().setError(getContext().getString(R.string.product_already_exists));
}
else
<BUG>{
dialogCache.getProductNameInputLayout().setError(null);
dialog.getButton(Dialog.BUTTON_POSITIVE).setEnabled(true);</BUG>
}
}

{
@Override
public void onClick(View v)
{
if ( !dto.isDefaultImage() && !dialogCache.isImageScheduledForDeletion() )
{
if ( !ImageViewerDialog.isOpened() )
{
DialogFragment imageViewerDialog = ImageViewerDialog.newInstance(dto, dialogCache);
imageViewerDialog.show(cache.getActivity().getSupportFragmentManager(), "ProductViewer");
}
}
}
