Always report visibility to new ImageView drawables
Fix a regression where some drawables would not be correctly updated with their visibility state if set while an ImageView was not attached to a window. Bug 30216207 Change-Id: Ia30326a78168141c8f85bad9c782710f965623b7
This commit is contained in:
@@ -933,9 +933,8 @@ public class ImageView extends View {
|
|||||||
if (d.isStateful()) {
|
if (d.isStateful()) {
|
||||||
d.setState(getDrawableState());
|
d.setState(getDrawableState());
|
||||||
}
|
}
|
||||||
if (isAttachedToWindow()) {
|
d.setVisible(isAttachedToWindow() && getWindowVisibility() == VISIBLE && isShown(),
|
||||||
d.setVisible(getWindowVisibility() == VISIBLE && isShown(), true);
|
true);
|
||||||
}
|
|
||||||
d.setLevel(mLevel);
|
d.setLevel(mLevel);
|
||||||
mDrawableWidth = d.getIntrinsicWidth();
|
mDrawableWidth = d.getIntrinsicWidth();
|
||||||
mDrawableHeight = d.getIntrinsicHeight();
|
mDrawableHeight = d.getIntrinsicHeight();
|
||||||
|
|||||||
Reference in New Issue
Block a user