Merge "Fix gear not showing on left hand side of notification" into nyc-dev

This commit is contained in:
Mady Mellor
2016-04-12 16:35:32 +00:00
committed by Android (Google) Code Review

View File

@@ -232,8 +232,9 @@ public class NotificationSettingsIconRow extends FrameLayout implements View.OnC
return; return;
} }
final boolean isRtl = mParent.isLayoutRtl(); final boolean isRtl = mParent.isLayoutRtl();
final float left = isRtl ? -(mParent.getWidth() - mHorizSpaceForGear) : 0; // TODO No need to cast to float here once b/28050538 is fixed.
final float right = isRtl ? 0 : (mParent.getWidth() - mHorizSpaceForGear); final float left = (float) (isRtl ? -(mParent.getWidth() - mHorizSpaceForGear) : 0);
final float right = (float) (isRtl ? 0 : (mParent.getWidth() - mHorizSpaceForGear));
setTranslationX(onLeft ? left : right); setTranslationX(onLeft ? left : right);
mOnLeft = onLeft; mOnLeft = onLeft;
} }