I get acquainted with the animation in android, I learned from the guides "The Rise of the Sun". I am trying to figure out how more complex animations are made, such as a drum. It turns out the drum consists of some elements that rotate in one direction, but when the elements go beyond the edge, it turns out that the element needs to be moved to the other edge and continue to twist.
Where can you read about it? I guess for all the elements you need to start several scrolling animations with different start (or can they be somehow combined?)
"Sun Rising"
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:duration="5000" android:fillAfter="true" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:shareInterpolator="false" > <scale android:fromXScale="1.0" android:fromYScale="1.0" android:pivotX="50%" android:pivotY="50%" android:toXScale="1.5" android:toYScale="1.5" /> <translate android:fromYDelta="80%p" android:toYDelta="10%p" /> <alpha android:fromAlpha="0.3" android:toAlpha="1.0" /> </set> In the main activation to call the animation prescribe
// ΠΠ½ΠΈΠΌΠ°ΡΠΈΡ Π΄Π»Ρ Π²ΠΎΡΡ
ΠΎΠ΄Π° ΡΠΎΠ»Π½ΡΠ° Animation sunRiseAnimation = AnimationUtils.loadAnimation(MainActivity.this, R.anim.sun_rise); // ΠΠΎΠ΄ΠΊΠ»ΡΡΠ°Π΅ΠΌ Π°Π½ΠΈΠΌΠ°ΡΠΈΡ ΠΊ Π½ΡΠΆΠ½ΠΎΠΌΡ View sunImageView.startAnimation(sunRiseAnimation);