Ensure smart replies are always visible
Fixes: 205657774 Test: post notification with smart replies, rotate with shade closed, open shade Change-Id: I2a527aa9d91ddb6008447bb2a72433031bed782e
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user