The difference between Android transition animations Windowanimation and activityanimation
Obviously, window and activity itself know differently from names, but the difference between Windowanimation and activityanimation in project development must be understood.
The main differences are as follows
1.windowAnimation includes windowenteranimation and windowexitanimation; Activityanimation contains android: Activityopenenteranimation, Android:activityopenexitanimation, Android:activitycloseenteranimation and Android: Activitycloseexitanimation
2. The Windowanimation control over the project is greater than the control of the activity, that is, if both windowanimation and Activityanimation are set during the activity transition, Possible (because of this very much) will only execute windowanimation
3. The definition of windowanimation is simple, only need to inherit the animation style in the Style.xml file
<style name="Animation" parent="@android: Style/animation" > <!--form into animation -- <name= "android:windowenteranimation" > @anim/slide_left_enter</<name=" Android:windowexitanimation "> @anim/slide_right_exit</</style>
For activity, you need to inherit animation activity Style
<style name="Feelyouwindowanimtheme" parent="@android: Style/animation.activity" > <ItemName="Android:activityopenenteranimation" > @android: Anim/slide_in_left</item> < item name= "Android:activityopenexitanimation" > @android: Anim/slide_out_right</item> <item name= "Android: Activitycloseenteranimation "> @anim/push_right_in</item> <item name= "Android:activitycloseexitanimation" > @anim/push_left_out</item> </STYLE>
A2 when Android A2 when Android A1 when AndroidA1, Android: Activitycloseenteranimation
From the definition of the above 2 animation, it is obvious that activityanimation is more complex, but the transition effect of this complex is very good, can control the animation of 2 activity at the same time, Unlike Windowanimation, you can only control the form animation of the next activity.
5. In development, form animations can also use Activity. Overridependingtransition can be set or defined in a theme, but activity can only be used in themes
<Application Android:name= "Test.view.weitop.BaseApplication" android:allowbackup= "false" Android: Hardwareaccelerated= "false" android:icon= "@drawable/ app_logo " android: Label= "@string/app_name" Android:largeheap= "true" Android:theme= "@style/theme.app" > </APPLICATION>
6. For the comparison of the pursuit of aesthetic aesthetics of animation, the use of activityanimation is much better, so for general development use windowanimation can, but for the pursuit of user experience, then directly use Activity Animation Bar
Android Transitions Animation windowanimation and activityanimation differences (RPM)