[Search][Layout] Fix blank space when predictions are disabled

This regression is caused due to getExpectedHeight relying on view visibility state while AlphaUpdateListener.updateVisibility was reseting the views visibility.

Bug: 184211402
Test: local
Change-Id: Ib756f5eb8f6356a18a025626008b97fd7c77fec9
This commit is contained in:
Samuel Fufa
2021-04-06 04:05:13 -05:00
parent dd2b8b6f2e
commit 5461089baa
@@ -237,7 +237,9 @@ public class PredictionRowView extends LinearLayout implements
setTranslationY(scroll);
}
setAlpha(mScrolledOut ? 0 : 1);
AlphaUpdateListener.updateVisibility(this);
if (getVisibility() != GONE) {
AlphaUpdateListener.updateVisibility(this);
}
}
@Override