breakX = currentX;
    protected void adjustRow(FlowView fv, int rowIndex, int desiredSpan, int x) {      // Determine the last view that has the highest break weight.      int axis = fv.getFlowAxis();      View row = fv.getView(rowIndex);      int count = row.getViewCount();      int breakIndex = -1;      int maxBreakWeight = View.BadBreakWeight;      int breakX = x;      int breakSpan = desiredSpan;      int currentX = x;      int currentSpan = desiredSpan;      for (int i = 0; i < count; ++i)        {          View view = row.getView(i);          int weight = view.getBreakWeight(axis, currentX, currentSpan);          if (weight >= maxBreakWeight)            {              breakIndex = i;              breakX = currentX;              breakSpan = currentSpan;              maxBreakWeight = weight;            }          int size = (int) view.getPreferredSpan(axis);          currentX += size;          currentSpan -= size;        }      // If there is a potential break location found, break the row at      // this location.      if (breakIndex > -1)        {          View toBeBroken = row.getView(breakIndex);          View brokenView = toBeBroken.breakView(axis,                                                 toBeBroken.getStartOffset(),                                                 breakX, breakSpan);          row.replace(breakIndex, count - breakIndex,                      new View[]{brokenView});        }    }