AsyncDrawable placeholder bounds fix
This commit is contained in:
parent
f4e0ecc4fb
commit
f0a03b7df6
@ -45,10 +45,8 @@ public class AsyncDrawable extends Drawable {
|
|||||||
|
|
||||||
// process placeholder bounds
|
// process placeholder bounds
|
||||||
if (placeholder.getBounds().isEmpty()) {
|
if (placeholder.getBounds().isEmpty()) {
|
||||||
// set intrinsic bounds for both drawables (this one and placeholder)
|
|
||||||
final Rect rect = DrawableUtils.intrinsicBounds(placeholder);
|
final Rect rect = DrawableUtils.intrinsicBounds(placeholder);
|
||||||
placeholder.setBounds(rect);
|
placeholder.setBounds(rect);
|
||||||
setBounds(rect);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// apply placeholder immediately if we have one
|
// apply placeholder immediately if we have one
|
||||||
|
Loading…
x
Reference in New Issue
Block a user