Loading core/java/android/view/ViewRoot.java +14 −0 Original line number Original line Diff line number Diff line Loading @@ -1675,6 +1675,16 @@ public final class ViewRoot extends Handler implements ViewParent, return (theParent instanceof ViewGroup) && isViewDescendantOf((View) theParent, parent); return (theParent instanceof ViewGroup) && isViewDescendantOf((View) theParent, parent); } } private static void forceLayout(View view) { view.forceLayout(); if (view instanceof ViewGroup) { ViewGroup group = (ViewGroup) view; final int count = group.getChildCount(); for (int i = 0; i < count; i++) { forceLayout(group.getChildAt(i)); } } } public final static int DO_TRAVERSAL = 1000; public final static int DO_TRAVERSAL = 1000; public final static int DIE = 1001; public final static int DIE = 1001; Loading Loading @@ -1862,6 +1872,10 @@ public final class ViewRoot extends Handler implements ViewParent, if (msg.what == RESIZED_REPORT) { if (msg.what == RESIZED_REPORT) { mReportNextDraw = true; mReportNextDraw = true; } } if (mView != null) { forceLayout(mView); } requestLayout(); requestLayout(); } } break; break; Loading Loading
core/java/android/view/ViewRoot.java +14 −0 Original line number Original line Diff line number Diff line Loading @@ -1675,6 +1675,16 @@ public final class ViewRoot extends Handler implements ViewParent, return (theParent instanceof ViewGroup) && isViewDescendantOf((View) theParent, parent); return (theParent instanceof ViewGroup) && isViewDescendantOf((View) theParent, parent); } } private static void forceLayout(View view) { view.forceLayout(); if (view instanceof ViewGroup) { ViewGroup group = (ViewGroup) view; final int count = group.getChildCount(); for (int i = 0; i < count; i++) { forceLayout(group.getChildAt(i)); } } } public final static int DO_TRAVERSAL = 1000; public final static int DO_TRAVERSAL = 1000; public final static int DIE = 1001; public final static int DIE = 1001; Loading Loading @@ -1862,6 +1872,10 @@ public final class ViewRoot extends Handler implements ViewParent, if (msg.what == RESIZED_REPORT) { if (msg.what == RESIZED_REPORT) { mReportNextDraw = true; mReportNextDraw = true; } } if (mView != null) { forceLayout(mView); } requestLayout(); requestLayout(); } } break; break; Loading