Merge "Fix the wrong number of icons in shelf for RTL" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-11-07 04:35:40 +00:00
committed by Android (Google) Code Review

View File

@@ -536,7 +536,8 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
return 0;
}
int translation = (int) (mLastVisibleIconState.xTranslation + mIconSize);
int translation = (int) (isLayoutRtl() ? getWidth() - mLastVisibleIconState.xTranslation
: mLastVisibleIconState.xTranslation + mIconSize);
// There's a chance that last translation goes beyond the edge maybe
return Math.min(getWidth(), translation);
}