From 8ae2c550257e8bfa713f9fa17b8b8b00bb288d85 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Tue, 5 Apr 2016 21:05:44 -0700 Subject: [PATCH] Fix gear not showing on left hand side of notification This is a work around for b/28050538, casting these values to floats should be unnecessary. Once this bug is fixed this can be reverted. Bug: 28029191 Change-Id: I5c3efe9e01dbac4e9f30753a88a4fe59cb13e7e7 --- .../systemui/statusbar/NotificationSettingsIconRow.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationSettingsIconRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationSettingsIconRow.java index a5ebbbab36b39..9ed50224ed2df 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationSettingsIconRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationSettingsIconRow.java @@ -232,8 +232,9 @@ public class NotificationSettingsIconRow extends FrameLayout implements View.OnC return; } final boolean isRtl = mParent.isLayoutRtl(); - final float left = isRtl ? -(mParent.getWidth() - mHorizSpaceForGear) : 0; - final float right = isRtl ? 0 : (mParent.getWidth() - mHorizSpaceForGear); + // TODO No need to cast to float here once b/28050538 is fixed. + final float left = (float) (isRtl ? -(mParent.getWidth() - mHorizSpaceForGear) : 0); + final float right = (float) (isRtl ? 0 : (mParent.getWidth() - mHorizSpaceForGear)); setTranslationX(onLeft ? left : right); mOnLeft = onLeft; }