Merge "Avoid drawing tall header when scrolling search results" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-05-21 17:34:42 +00:00
committed by Android (Google) Code Review

View File

@@ -298,7 +298,7 @@ public class FloatingHeaderView extends LinearLayout implements
@Override
protected void dispatchDraw(Canvas canvas) {
if (mHeaderCollapsed && mTabLayout.getVisibility() == VISIBLE
if (mHeaderCollapsed && !mCollapsed && mTabLayout.getVisibility() == VISIBLE
&& mHeaderColor != Color.TRANSPARENT) {
mBGPaint.setColor(mHeaderColor);
mBGPaint.setAlpha((int) (255 * mHeaderAnimator.getAnimatedFraction()));