setWillNotCacheDrawing true for SimpleImageView

This commit is contained in:
seven332 committed 2015-05-28 20:43:22 +08:00
1 parent 2c151cafe9
commit c1af94afa0
1 file changed
+3
@@ -46,6 +46,9 @@ public class SimpleImageView extends View implements Drawable.Callback {
final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS);
setDrawable(a.getDrawable(0));
a.recycle();
// Mostly drawable is VectorDrawable, it has cache already
setWillNotCacheDrawing(true);
}
public void setDrawable(@DrawableRes int resId) {