ImageView appears empty if LayerDrawable is mutated inside it |
||
Issue descriptionWriting this down for posterity. Hit this during migration to AppCompatImageView: https://chromium-review.googlesource.com/c/chromium/src/+/1245786/3/chrome/android/java/res/layout/contextual_suggestions_card_modern.xml#103. Repro steps: 1. Add imageView to the layout. 2. imageView.setImageDrawable(layerDrawable); // works fine with BitmapDrawable 3. layerDrawable.mutate(); Result: imageView shows up empty. It turns out that this is caused by faulty LayerDrawable.mutate() implementation in KitKat - it wasn't copying bounds from old child drawables. It got fixed in Lollipop: https://android.googlesource.com/platform/frameworks/base/+/d7853e576301bf68e96148a0b9e52085bfc7cf95.
,
Oct 1
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Sep 28