Rect Animation (Android)

can i do a rect (); animate like that? I tried it for 3 hours but it doesn’t quite work

Screen_Recording_20210620-020817_One UI Home

I need this without lags


and instead of the right I wanted to take an image like this:

I think what you are trying to achieve is oscilating motion.

Please see