Merge "Fix wrong split percentage after split layout been pushed up" into tm-dev am: 8eba01dca3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17505943 Change-Id: I6fb3036f3848112a4f37eae6134a76a98b6b3eea Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -154,10 +154,12 @@ public final class SplitConfigurationOptions {
|
||||
}
|
||||
}
|
||||
|
||||
leftTaskPercent = this.leftTopBounds.width() / (float) rightBottomBounds.right;
|
||||
topTaskPercent = this.leftTopBounds.height() / (float) rightBottomBounds.bottom;
|
||||
dividerWidthPercent = visualDividerBounds.width() / (float) rightBottomBounds.right;
|
||||
dividerHeightPercent = visualDividerBounds.height() / (float) rightBottomBounds.bottom;
|
||||
float totalWidth = rightBottomBounds.right - leftTopBounds.left;
|
||||
float totalHeight = rightBottomBounds.bottom - leftTopBounds.top;
|
||||
leftTaskPercent = leftTopBounds.width() / totalWidth;
|
||||
topTaskPercent = leftTopBounds.height() / totalHeight;
|
||||
dividerWidthPercent = visualDividerBounds.width() / totalWidth;
|
||||
dividerHeightPercent = visualDividerBounds.height() / totalHeight;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user