Merge "Dispatch aggregated visibility when performing attachViewToParent" into nyc-dev
This commit is contained in:
@@ -4994,6 +4994,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
|||||||
if (child.hasFocus()) {
|
if (child.hasFocus()) {
|
||||||
requestChildFocus(child, child.findFocus());
|
requestChildFocus(child, child.findFocus());
|
||||||
}
|
}
|
||||||
|
dispatchVisibilityAggregated(isAttachedToWindow() && getWindowVisibility() == VISIBLE
|
||||||
|
&& isShown());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -913,7 +913,9 @@ public class ImageView extends View {
|
|||||||
if (mDrawable != null) {
|
if (mDrawable != null) {
|
||||||
mDrawable.setCallback(null);
|
mDrawable.setCallback(null);
|
||||||
unscheduleDrawable(mDrawable);
|
unscheduleDrawable(mDrawable);
|
||||||
mDrawable.setVisible(false, false);
|
if (isAttachedToWindow()) {
|
||||||
|
mDrawable.setVisible(false, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mDrawable = d;
|
mDrawable = d;
|
||||||
@@ -924,8 +926,9 @@ public class ImageView extends View {
|
|||||||
if (d.isStateful()) {
|
if (d.isStateful()) {
|
||||||
d.setState(getDrawableState());
|
d.setState(getDrawableState());
|
||||||
}
|
}
|
||||||
d.setVisible(isAttachedToWindow() && getWindowVisibility() == VISIBLE && isShown(),
|
if (isAttachedToWindow()) {
|
||||||
true);
|
d.setVisible(getWindowVisibility() == VISIBLE && isShown(), 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