private void layoutInternal() {
    do {
      mView.measure(mWidthMeasureSpec, mHeightMeasureSpec);
      layoutView();
    } while (mView.isLayoutRequested());
  }
Measure and layout the view after all the configuration is done.

@returns an AfterLayout object that can be used to perform common operations after the layout
    is done such as dispatchPreDraw()l.
core/src/main/java/com/facebook/testing/screenshot/ViewHelpers.java