Fix SearchView measure for UNSPECIFIED height.
Previously it would almost always force SearchView to become 0 when height mode was UNSPECIFIED. Bug: 31302290 Change-Id: Icd2116b84951b1b967666147dbc5762d996408e6
This commit is contained in:
@@ -816,9 +816,11 @@ public class SearchView extends LinearLayout implements CollapsibleActionView {
|
||||
|
||||
switch (heightMode) {
|
||||
case MeasureSpec.AT_MOST:
|
||||
case MeasureSpec.UNSPECIFIED:
|
||||
height = Math.min(getPreferredHeight(), height);
|
||||
break;
|
||||
case MeasureSpec.UNSPECIFIED:
|
||||
height = getPreferredHeight();
|
||||
break;
|
||||
}
|
||||
heightMode = MeasureSpec.EXACTLY;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user