Merge "Don't layout with 0 width if we've got a real width"
This commit is contained in:
commit
c0604d9648
@ -243,6 +243,7 @@ public class MessageListItem extends View {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||||
|
if (widthMeasureSpec != 0 || mViewWidth == 0) {
|
||||||
mViewWidth = MeasureSpec.getSize(widthMeasureSpec);
|
mViewWidth = MeasureSpec.getSize(widthMeasureSpec);
|
||||||
int mode = getViewMode(mViewWidth);
|
int mode = getViewMode(mViewWidth);
|
||||||
if (mode != mMode) {
|
if (mode != mMode) {
|
||||||
@ -251,6 +252,7 @@ public class MessageListItem extends View {
|
|||||||
mSnippetLineCount = NEEDS_LAYOUT;
|
mSnippetLineCount = NEEDS_LAYOUT;
|
||||||
}
|
}
|
||||||
mViewHeight = measureHeight(heightMeasureSpec, mMode);
|
mViewHeight = measureHeight(heightMeasureSpec, mMode);
|
||||||
|
}
|
||||||
setMeasuredDimension(mViewWidth, mViewHeight);
|
setMeasuredDimension(mViewWidth, mViewHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user