Loading core/java/android/view/ViewRootImpl.java +10 −5 Original line number Diff line number Diff line Loading @@ -824,10 +824,12 @@ public final class ViewRootImpl implements ViewParent, @Override public void requestLayout() { if (!mHandlingLayoutInLayoutRequest) { checkThread(); mLayoutRequested = true; scheduleTraversals(); } } @Override public boolean isLayoutRequested() { Loading Loading @@ -1712,7 +1714,7 @@ public final class ViewRootImpl implements ViewParent, boolean triggerGlobalLayoutListener = didLayout || attachInfo.mRecomputeGlobalAttributes; if (didLayout) { performLayout(); performLayout(lp, desiredWindowWidth, desiredWindowHeight); // By this point all views have been sized and positionned // We can compute the transparent area Loading Loading @@ -1920,7 +1922,8 @@ public final class ViewRootImpl implements ViewParent, } } private void performLayout() { private void performLayout(WindowManager.LayoutParams lp, int desiredWindowWidth, int desiredWindowHeight) { mLayoutRequested = false; mScrollMayChange = true; mInLayout = true; Loading @@ -1942,6 +1945,8 @@ public final class ViewRootImpl implements ViewParent, for (int i = 0; i < numViewsRequestingLayout; ++i) { mLayoutRequesters.get(i).requestLayout(); } measureHierarchy(host, lp, mView.getContext().getResources(), desiredWindowWidth, desiredWindowHeight); // Now run layout one more time mInLayout = true; host.layout(0, 0, host.getMeasuredWidth(), host.getMeasuredHeight()); Loading Loading
core/java/android/view/ViewRootImpl.java +10 −5 Original line number Diff line number Diff line Loading @@ -824,10 +824,12 @@ public final class ViewRootImpl implements ViewParent, @Override public void requestLayout() { if (!mHandlingLayoutInLayoutRequest) { checkThread(); mLayoutRequested = true; scheduleTraversals(); } } @Override public boolean isLayoutRequested() { Loading Loading @@ -1712,7 +1714,7 @@ public final class ViewRootImpl implements ViewParent, boolean triggerGlobalLayoutListener = didLayout || attachInfo.mRecomputeGlobalAttributes; if (didLayout) { performLayout(); performLayout(lp, desiredWindowWidth, desiredWindowHeight); // By this point all views have been sized and positionned // We can compute the transparent area Loading Loading @@ -1920,7 +1922,8 @@ public final class ViewRootImpl implements ViewParent, } } private void performLayout() { private void performLayout(WindowManager.LayoutParams lp, int desiredWindowWidth, int desiredWindowHeight) { mLayoutRequested = false; mScrollMayChange = true; mInLayout = true; Loading @@ -1942,6 +1945,8 @@ public final class ViewRootImpl implements ViewParent, for (int i = 0; i < numViewsRequestingLayout; ++i) { mLayoutRequesters.get(i).requestLayout(); } measureHierarchy(host, lp, mView.getContext().getResources(), desiredWindowWidth, desiredWindowHeight); // Now run layout one more time mInLayout = true; host.layout(0, 0, host.getMeasuredWidth(), host.getMeasuredHeight()); Loading