Hi,
I am creating an application which retrieves images from the web. In case the image cannot be retrieved another local image should be used.
While trying to execute the following lines:
Drawable drawable = Common.getDrawableFromUrl(this, product.getMapPath());
if(drawable.equals(null)){
drawable = getRandomDrawable();
}
The line if(drawable.equals(null)) throws an exception if drawable is null.
Does anyone know how should the value of drawable be checked in order not to throw an exception in case it is null and retrieve the local image (execute drawable = getRandomDrawable())?