Overflow number supports RTL layout am: 09b7dea5b7
am: 327663f485
Change-Id: If27e182f89f6528b9a5f3c44baa25357aae5ed16
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
index 9fd09d9..78e56c0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
@@ -205,7 +205,7 @@
&& MeasureSpec.getMode(widthMeasureSpec) != MeasureSpec.UNSPECIFIED) {
singleLineWidthSpec = MeasureSpec.makeMeasureSpec(
width - mSingleLineWidthIndention + mSingleLineView.getPaddingEnd(),
- MeasureSpec.AT_MOST);
+ MeasureSpec.EXACTLY);
}
mSingleLineView.measure(singleLineWidthSpec,
MeasureSpec.makeMeasureSpec(maxSize, MeasureSpec.AT_MOST));
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java
index 3c9373b..d7920a9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java
@@ -123,8 +123,10 @@
mDividers.get(i).layout(0, 0, getWidth(), mDividerHeight);
}
if (mOverflowNumber != null) {
- mOverflowNumber.layout(getWidth() - mOverflowNumber.getMeasuredWidth(), 0, getWidth(),
- mOverflowNumber.getMeasuredHeight());
+ boolean isRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
+ int left = (isRtl ? 0 : getWidth() - mOverflowNumber.getMeasuredWidth());
+ int right = left + mOverflowNumber.getMeasuredWidth();
+ mOverflowNumber.layout(left, 0, right, mOverflowNumber.getMeasuredHeight());
}
if (mNotificationHeader != null) {
mNotificationHeader.layout(0, 0, mNotificationHeader.getMeasuredWidth(),