Merge "Fix wrong split percentage after split layout been pushed up" into tm-dev

This commit is contained in:
Jerry Chang authored and Android (Google) Code Review committed 2022-03-31 04:07:15 +00:00
commit 8eba01dca3
1 file changed
+6 -4
@@ -154,10 +154,12 @@ public final class SplitConfigurationOptions {
} }
} }
leftTaskPercent = this.leftTopBounds.width() / (float) rightBottomBounds.right; float totalWidth = rightBottomBounds.right - leftTopBounds.left;
topTaskPercent = this.leftTopBounds.height() / (float) rightBottomBounds.bottom; float totalHeight = rightBottomBounds.bottom - leftTopBounds.top;
dividerWidthPercent = visualDividerBounds.width() / (float) rightBottomBounds.right; leftTaskPercent = leftTopBounds.width() / totalWidth;
dividerHeightPercent = visualDividerBounds.height() / (float) rightBottomBounds.bottom; topTaskPercent = leftTopBounds.height() / totalHeight;
dividerWidthPercent = visualDividerBounds.width() / totalWidth;
dividerHeightPercent = visualDividerBounds.height() / totalHeight;
} }
} }