Hi, I am going to develop flip animation in android between fragment transactions using a supported jar file. Due to the fact that I want to implement snippets for lower versions. I found an android developer guide for displaying animations. But the supported library does not support Objactor animations . After searching the Internet, I found that I need to change the objacter animations for Tween animations. . change these xml files to animate animations as shown below.
card_flip_left_in.xml
<alpha android:valueFrom="1.0" android:valueTo="0.0" android:propertyName="alpha" android:duration="0" /> <rotate android:valueFrom="-180" android:valueTo="0" android:propertyName="rotationY" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:duration="@integer/card_flip_time_full"/> <alpha android:valueFrom="0.0" android:valueTo="1.0" android:propertyName="alpha" android:startOffset="@integer/card_flip_time_half" android:duration="1" />
card_flip_left_out.xml
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" > <rotate android:duration="@integer/card_flip_time_full" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:propertyName="rotationY" android:valueFrom="0" android:valueTo="180" /> <alpha android:duration="1" android:propertyName="alpha" android:startOffset="@integer/card_flip_time_half" android:valueFrom="1.0" android:valueTo="0.0" /> </set>
card_flip_right_in.xml
<alpha android:duration="0" android:propertyName="alpha" android:valueFrom="1.0" android:valueTo="0.0" /> <rotate android:duration="@integer/card_flip_time_full" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:propertyName="rotationY" android:valueFrom="180" android:valueTo="0" /> <alpha android:duration="1" android:propertyName="alpha" android:startOffset="@integer/card_flip_time_half" android:valueFrom="0.0" android:valueTo="1.0" /> </set>
card_flip_right_out.xml
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" > <rotate android:duration="@integer/card_flip_time_full" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:propertyName="rotationY" android:valueFrom="0" android:valueTo="-180" /> <alpha android:duration="1" android:propertyName="alpha" android:startOffset="@integer/card_flip_time_half" android:valueFrom="1.0" android:valueTo="0.0" /> </set>
I modified these xml files, but this does not work for us .. can someone explain to me what was wrong with what I am doing. Please help me out using full tutorials and other sources. The right animations are animations for them.
source share