docs: private boolean updateAnchorFromPendingDataExpose(RecyclerView.State state, AnchorInfo anchorInfo) {
          if (state.isPreLayout() || mCurrentPendingScrollPosition == RecyclerView.NO_POSITION) {
              return false;
          }
          // validate scroll position
          if (mCurrentPendingScrollPosition < 0 || mCurrentPendingScrollPosition >= state.getItemCount()) {
              mCurrentPendingScrollPosition = RecyclerView.NO_POSITION;
              mPendingScrollPositionOffset = INVALID_OFFSET;
              if (DEBUG) {
                  Log.e(TAG, "ignoring invalid scroll position " + mCurrentPendingScrollPosition);
              }
              return false;
          }
  
          // if child is visible, try to make it a reference child and ensure it is fully visible.
          // if child is not visible, align it depending on its virtual position.
          anchorInfo.mPosition = mCurrentPendingScrollPosition;
          if (mCurrentPendingSavedState != null && mCurrentPendingSavedState.getInt("AnchorPosition")>=0) {
              // Anchor offset depends on how that child was laid out. Here, we update it
              // according to our current view bounds
              anchorInfo.mLayoutFromEnd = mCurrentPendingSavedState.getBoolean("AnchorLayoutFromEnd");
              if (anchorInfo.mLayoutFromEnd) {
                  anchorInfo.mCoordinate = mOrientationHelper.getEndAfterPadding() -
                          mCurrentPendingSavedState.getInt("AnchorOffset");
              } else {
                  anchorInfo.mCoordinate = mOrientationHelper.getStartAfterPadding() +
                          mCurrentPendingSavedState.getInt("AnchorOffset");
              }
              return true;
          }
  
          if (mPendingScrollPositionOffset == INVALID_OFFSET) {
              View child = findViewByPosition(mCurrentPendingScrollPosition);
              if (child != null) {
                  final int childSize = mOrientationHelper.getDecoratedMeasurement(child);
                  if (childSize > mOrientationHelper.getTotalSpace()) {
                      // item does not fit. fix depending on layout direction
                      anchorInfo.assignCoordinateFromPadding();
                      return true;
                  }
                  final int startGap = mOrientationHelper.getDecoratedStart(child)
                          - mOrientationHelper.getStartAfterPadding();
                  if (startGap < 0) {
                      anchorInfo.mCoordinate = mOrientationHelper.getStartAfterPadding();
                      anchorInfo.mLayoutFromEnd = false;
                      return true;
                  }
                  final int endGap = mOrientationHelper.getEndAfterPadding() -
                          mOrientationHelper.getDecoratedEnd(child);
                  if (endGap < 0) {
                      anchorInfo.mCoordinate = mOrientationHelper.getEndAfterPadding();
                      anchorInfo.mLayoutFromEnd = true;
                      return true;
                  }
                  anchorInfo.mCoordinate = anchorInfo.mLayoutFromEnd
                          ? (mOrientationHelper.getDecoratedEnd(child) + mOrientationHelper
                          .getTotalSpaceChange())
                          : mOrientationHelper.getDecoratedStart(child);
              } else { // item is not visible.
                  if (getChildCount() > 0) {
                      // get position of any child, does not matter
                      int pos = getPosition(getChildAt(0));
                      anchorInfo.mLayoutFromEnd = mCurrentPendingScrollPosition < pos
                              == mShouldReverseLayoutExpose;
                  }
                  anchorInfo.assignCoordinateFromPadding();
              }
              return true;
          }
          // override layout from end values for consistency
          anchorInfo.mLayoutFromEnd = mShouldReverseLayoutExpose;
          if (mShouldReverseLayoutExpose) {
              anchorInfo.mCoordinate = mOrientationHelper.getEndAfterPadding() -
                      mPendingScrollPositionOffset;
          } else {
              anchorInfo.mCoordinate = mOrientationHelper.getStartAfterPadding() +
                      mPendingScrollPositionOffset;
          }
          return true;
      }