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()) {
|
||||
requestChildFocus(child, child.findFocus());
|
||||
}
|
||||
dispatchVisibilityAggregated(isAttachedToWindow() && getWindowVisibility() == VISIBLE
|
||||
&& isShown());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -913,7 +913,9 @@ public class ImageView extends View {
|
||||
if (mDrawable != null) {
|
||||
mDrawable.setCallback(null);
|
||||
unscheduleDrawable(mDrawable);
|
||||
mDrawable.setVisible(false, false);
|
||||
if (isAttachedToWindow()) {
|
||||
mDrawable.setVisible(false, false);
|
||||
}
|
||||
}
|
||||
|
||||
mDrawable = d;
|
||||
@@ -924,8 +926,9 @@ public class ImageView extends View {
|
||||
if (d.isStateful()) {
|
||||
d.setState(getDrawableState());
|
||||
}
|
||||
d.setVisible(isAttachedToWindow() && getWindowVisibility() == VISIBLE && isShown(),
|
||||
true);
|
||||
if (isAttachedToWindow()) {
|
||||
d.setVisible(getWindowVisibility() == VISIBLE && isShown(), true);
|
||||
}
|
||||
d.setLevel(mLevel);
|
||||
mDrawableWidth = d.getIntrinsicWidth();
|
||||
mDrawableHeight = d.getIntrinsicHeight();
|
||||
|
||||
Reference in New Issue
Block a user