private void updateAttrs(Drawable drawable) {
        if (drawable == null) { return; }

        if (drawable instanceof RoundedDrawable) {
            ((RoundedDrawable) drawable)
                    .setScaleType(mScaleType)
                    .setCornerRadius(cornerRadius)
                    .setBorderWidth(borderWidth)
                    .setBorderColor(borderColor)
                    .setOval(isOval);
        } else if (drawable instanceof LayerDrawable) {
            // loop through layers to and set drawable attrs
            LayerDrawable ld = ((LayerDrawable) drawable);
            for (int i = 0, layers = ld.getNumberOfLayers(); i < layers; i++) {
                updateAttrs(ld.getDrawable(i));
            }
        }
    }
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