public AfterLayout layout() {
    if (!mGuessListViewHeight) {
      layoutInternal();
    } else {
      layoutWithHeightDetection();
    }
    dispatchOnGlobalLayout(mView);
    dispatchPreDraw(mView);
    return new AfterLayout();
  }
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