summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lucas Dupin <dupin@google.com> 2020-04-09 16:29:59 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-04-09 16:29:59 +0000
commit34d2844601ec620f6c5eb2c9de9274783ec9bef9 (patch)
treee232c4925426a6174c5578a9b9dcf3951747bc8d
parent7cbba76be95e3537a92b0915360c88d12913b95e (diff)
parentff92353f27e851c0ffd2bc3c08d76f144015a6b8 (diff)
Merge "Calculate spacers properly" into rvc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
index a5f42983e4e0..02c6ff68450e 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
@@ -429,7 +429,7 @@ class ControlsUiControllerImpl @Inject constructor (
}
// add spacers if necessary to keep control size consistent
- var spacersToAdd = selectedStructure.controls.size % maxColumns
+ var spacersToAdd = maxColumns - (selectedStructure.controls.size % maxColumns)
while (spacersToAdd > 0) {
lastRow.addView(Space(context), LinearLayout.LayoutParams(0, 0, 1f))
spacersToAdd--