Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26096cac authored by Miranda Kephart's avatar Miranda Kephart Committed by Android (Google) Code Review
Browse files

Merge "Limit the maxLines of the clipboard TextView to a minimum of 1" into main

parents 9e53369b f2834842
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ public class ClipboardOverlayView extends DraggableConstraintLayout {
        mTextPreview.getViewTreeObserver().addOnPreDrawListener(() -> {
            int availableHeight = mTextPreview.getHeight()
                    - (mTextPreview.getPaddingTop() + mTextPreview.getPaddingBottom());
            mTextPreview.setMaxLines(availableHeight / mTextPreview.getLineHeight());
            mTextPreview.setMaxLines(Math.max(availableHeight / mTextPreview.getLineHeight(), 1));
            return true;
        });
        super.onFinishInflate();