Overflow number supports RTL layout
am: 09b7dea5b7
Change-Id: Id8fbc4a333ba259bc469a405e7faafa2da30b468
This commit is contained in:
@@ -205,7 +205,7 @@ public class NotificationContentView extends FrameLayout {
|
||||
&& 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));
|
||||
|
||||
@@ -123,8 +123,10 @@ public class NotificationChildrenContainer extends ViewGroup {
|
||||
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(),
|
||||
|
||||
Reference in New Issue
Block a user