private Drawable resolveResource() {
        Resources rsrc = getResources();
        if (rsrc == null) { return null; }

        Drawable d = null;

        if (mResource != 0) {
            try {
                d = rsrc.getDrawable(mResource);
            } catch (Exception e) {
                Log.w(TAG, "Unable to find resource: " + mResource, e);
                // Don't try again.
                mResource = 0;
            }
        }
        return RoundedDrawable.fromDrawable(d);
    }
Controls how the image should be resized or moved to match the size
of this ImageView.

@param scaleType The desired scaling mode.
@attr ref android.R.styleable#ImageView_scaleType
sample/src/main/java/com/etiennelawlor/quickreturn/views/RoundedImageView.java