Fix quote preview being cut off.
When determining the height to force for the animation, the text was being measured assuming it had infinite width, which made it seem like it could fit on one line.
This commit is contained in:
parent
1f57e1f366
commit
9056371c41
1 changed files with 7 additions and 1 deletions
|
@ -187,7 +187,13 @@ public class InputPanel extends LinearLayout
|
|||
: 0;
|
||||
|
||||
this.quoteView.setVisibility(VISIBLE);
|
||||
this.quoteView.measure(0, 0);
|
||||
|
||||
int maxWidth = composeContainer.getWidth();
|
||||
if (quoteView.getLayoutParams() instanceof MarginLayoutParams) {
|
||||
MarginLayoutParams layoutParams = (MarginLayoutParams) quoteView.getLayoutParams();
|
||||
maxWidth -= layoutParams.leftMargin + layoutParams.rightMargin;
|
||||
}
|
||||
this.quoteView.measure(MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.AT_MOST), 0);
|
||||
|
||||
if (quoteAnimator != null) {
|
||||
quoteAnimator.cancel();
|
||||
|
|
Loading…
Add table
Reference in a new issue