Fix search bar expand animation

This commit is contained in:
NekoInverter committed 2020-10-30 15:46:28 +08:00
1 parent 9648a63622
commit 4c77c756a4
1 file changed
+2
@@ -419,10 +419,12 @@ public class SearchBar extends MaterialCardView implements View.OnClickListener,
final int state = canvas.save();
int bottom = MathUtils.lerp(mBaseHeight, mHeight, mProgress);
mRect.set(0, 0, mWidth, bottom);
setClipBounds(mRect);
canvas.clipRect(mRect);
super.draw(canvas);
canvas.restoreToCount(state);
} else {
setClipBounds(null);
super.draw(canvas);
}
}