Loading core/java/com/android/internal/widget/MessagingLinearLayout.java +6 −3 Original line number Original line Diff line number Diff line Loading @@ -111,14 +111,16 @@ public class MessagingLinearLayout extends ViewGroup { final int childHeight = child.getMeasuredHeight(); final int childHeight = child.getMeasuredHeight(); int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin + int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin + lp.bottomMargin + spacing); lp.bottomMargin + spacing); first = false; int measureType = MessagingChild.MEASURED_NORMAL; int measureType = MessagingChild.MEASURED_NORMAL; if (messagingChild != null) { if (messagingChild != null) { measureType = messagingChild.getMeasuredType(); measureType = messagingChild.getMeasuredType(); linesRemaining -= messagingChild.getConsumedLines(); linesRemaining -= messagingChild.getConsumedLines(); } } boolean isShortened = measureType == MessagingChild.MEASURED_SHORTENED; boolean isTooSmall = measureType == MessagingChild.MEASURED_TOO_SMALL; // We never measure the first item as too small, we want to at least show something. boolean isTooSmall = measureType == MessagingChild.MEASURED_TOO_SMALL && !first; boolean isShortened = measureType == MessagingChild.MEASURED_SHORTENED || measureType == MessagingChild.MEASURED_TOO_SMALL && first; if (newHeight <= targetHeight && !isTooSmall) { if (newHeight <= targetHeight && !isTooSmall) { totalHeight = newHeight; totalHeight = newHeight; measuredWidth = Math.max(measuredWidth, measuredWidth = Math.max(measuredWidth, Loading @@ -131,6 +133,7 @@ public class MessagingLinearLayout extends ViewGroup { } else { } else { break; break; } } first = false; } } setMeasuredDimension( setMeasuredDimension( Loading Loading
core/java/com/android/internal/widget/MessagingLinearLayout.java +6 −3 Original line number Original line Diff line number Diff line Loading @@ -111,14 +111,16 @@ public class MessagingLinearLayout extends ViewGroup { final int childHeight = child.getMeasuredHeight(); final int childHeight = child.getMeasuredHeight(); int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin + int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin + lp.bottomMargin + spacing); lp.bottomMargin + spacing); first = false; int measureType = MessagingChild.MEASURED_NORMAL; int measureType = MessagingChild.MEASURED_NORMAL; if (messagingChild != null) { if (messagingChild != null) { measureType = messagingChild.getMeasuredType(); measureType = messagingChild.getMeasuredType(); linesRemaining -= messagingChild.getConsumedLines(); linesRemaining -= messagingChild.getConsumedLines(); } } boolean isShortened = measureType == MessagingChild.MEASURED_SHORTENED; boolean isTooSmall = measureType == MessagingChild.MEASURED_TOO_SMALL; // We never measure the first item as too small, we want to at least show something. boolean isTooSmall = measureType == MessagingChild.MEASURED_TOO_SMALL && !first; boolean isShortened = measureType == MessagingChild.MEASURED_SHORTENED || measureType == MessagingChild.MEASURED_TOO_SMALL && first; if (newHeight <= targetHeight && !isTooSmall) { if (newHeight <= targetHeight && !isTooSmall) { totalHeight = newHeight; totalHeight = newHeight; measuredWidth = Math.max(measuredWidth, measuredWidth = Math.max(measuredWidth, Loading @@ -131,6 +133,7 @@ public class MessagingLinearLayout extends ViewGroup { } else { } else { break; break; } } first = false; } } setMeasuredDimension( setMeasuredDimension( Loading