Using ObjectAnimatorObjectAnimator is a powerful animation framework introduced in Android 3.0, which is used to animate the properties of any object. You can use ObjectAnimator to change the translationX and translationY properties of a View to implement the translation animation of a View. Using ValueAnimatorValueAnimator is a lower-level animation framework that generates a series of values during the animation process and then uses these values to update the properties of the View. For translation animation, update the translationX and translationY properties of the View by listening to the value changes of ValueAnimator. Using ViewPropertyAnimatorStarting from Android 3.0, the View class provides an animate() method that returns a ViewPropertyAnimator object that can be used to chain multiple animation methods. Using XML AnimationAnimations can be defined in XML files and loaded and applied when needed. Note: When using the startAnimation() method, the position of the View will be reset to its original position after the animation ends, unless you manually update the position of the View at the end of the animation. If you want the View to remain in its final position after the animation ends, consider using the ObjectAnimator, ValueAnimator, or ViewPropertyAnimator methods mentioned above. Using drawBitmapDraw pictures at different positions through drawBitmap, which is suitable for the need of using pictures as translation animation. |
<<: Several methods to implement delayed operation in Android development
>>: iOS 18 new features only support iPhone 15 Pro and above!
In 2016, live streaming e-commerce entered the pu...
Let me start with the definition: a community is ...
When we usually buy mobile phones, there are usua...
Since April, I have repeatedly heard that the ope...
1. Demand Background 1.1 Review of Competitive Pr...
[[356185]] How can I close Huabei and Baitiao? &q...
Today I will introduce to you offline methods of ...
Changsha tea tasting, take-out tea drinking, Yuel...
In May this year, I mentioned at the end of the a...
In 2018, the growth of China's mobile Interne...
Do you still remember the slogan "I won’t ac...
What is Tik Tok SEO? Before talking about what Do...
Baimei VIP course (focused on honest people trans...
This article is mostly the author's own thoug...
How can SEO novices avoid optimization misunderst...