amulyakhare / TextDrawable

This light-weight library provides images with letter/text like the Gmail app. It extends the Drawable class thus can be used with existing/custom/network ImageView classes. Also included is a fluent interface for creating drawables and a customizable ColorGenerator.
MIT License
3.16k stars 622 forks source link

Fix crash happening when mutate() a drawable generated on Android versions 4.1.x #64

Open leonardoaramaki opened 7 years ago

leonardoaramaki commented 7 years ago

There is bug reported on the Android framework that happens on Android versions 4.1.x where calling ShapeDrawable#mutate() causes a NPE since it calls its clone() method and try to copy a possible null insets RectF object into a new one which yields a crash.

This PR also updates the gradle plugin version and a few others in a non breaking change manner just so that the root project opens smoothly on newer versions of Android Studio.