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

Commit 96d821aa authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ensure smart replies are always visible" into sc-v2-dev

parents 504e256c e0d848ed
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -219,6 +219,7 @@ public class SmartReplyView extends ViewGroup {
    private void clearLayoutLineCount(View view) {
        if (view instanceof TextView) {
            ((TextView) view).nullLayouts();
            view.forceLayout();
        }
    }

@@ -270,6 +271,9 @@ public class SmartReplyView extends ViewGroup {

            clearLayoutLineCount(child);
            child.measure(MEASURE_SPEC_ANY_LENGTH, heightMeasureSpec);
            if (((Button) child).getLayout() == null) {
                Log.wtf(TAG, "Button layout is null after measure.");
            }

            coveredSuggestions.add(child);

@@ -590,6 +594,9 @@ public class SmartReplyView extends ViewGroup {
                button.getPaddingLeft() + button.getPaddingRight() + textWidth
                      + getLeftCompoundDrawableWidthWithPadding(button), MeasureSpec.AT_MOST);
        button.measure(widthMeasureSpec, heightMeasureSpec);
        if (button.getLayout() == null) {
            Log.wtf(TAG, "Button layout is null after measure.");
        }

        final int newWidth = button.getMeasuredWidth();