There is a great tool for creating animating vectors like this.
https://shapeshifter.design/ I have created your example there and I will try to explain how in next few steps.
In bottom left corner next to File, Import and Export click to add window to add new Path. After path is added select it and navigate to pathData field. First we will start with animated part, add this to pathData
M 4 6 L 22 2 L 2 22 L 19.5 3.5 L 4 6
You can check more information about M, L, Z commands here https://stackoverflow.com/a/42138513/13481732
Also set fill color to whatever you need.
In the bottom left corner for recently created path or in top right corner next to path name, select stopwatch and add pathData animation.
For first animation set
startTime = 0
endTime = 100 //CHANGE THIS BASE ON YOUR NEEDS
interpolator = Linear
fromValue = M 4 6 L 4 6 L 4 6 Z
toValue = M 4 6 L 22 2 L 19 3.5 Z
Then add another animation (There is + sign on added pathData animation in bottom left corner) and set next values
startTime = 100 //CHANGE THIS BASE ON YOUR NEEDS
endTime = 200 //CHANGE THIS BASE ON YOUR NEEDS
interpolator = Linear
fromValue = M 4 6 L 22 2 L 19 3.5 Z M 22 2 L 22 2 L 19 3.5 Z
toValue = M 4 6 L 22 2 L 19 3.5 Z M 22 2 L 2 22 L 19 3.5 Z
Then for white parts add two new paths. In top set pathData to this:
M 9 7.5 L 11.5 11 L 12.5 10 L 10.5 7.5 Z
In bottom set pathData to this:
M 13 12.5 L 15.5 15.5 L 17 15.5 L 14 11.5 Z
To change background color, in bottom left corner select vector and then in field canvasColor set your background Color.
After you are done you can export it as Animated Vector Drawable and add it to your project. When you add generated .xml file to project open it and change width and height.
This is an example how to start animation:
Drawable drawable = imageView.getDrawable();
if( drawable instanceof AnimatedVectorDrawable ) {
AnimatedVectorDrawable animation = (AnimatedVectorDrawable) drawable;
animation.start();
}