Android flip animation between fragments with supported jar v4 file

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

<!-- Before rotating, immediately set the alpha to 0. --> <alpha android:valueFrom="1.0" android:valueTo="0.0" android:propertyName="alpha" android:duration="0" /> <!-- Rotate. --> <rotate android:valueFrom="-180" android:valueTo="0" android:propertyName="rotationY" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:duration="@integer/card_flip_time_full"/> <!-- Half-way through the rotation (see startOffset), set the alpha to 1. --> <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. --> <rotate android:duration="@integer/card_flip_time_full" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:propertyName="rotationY" android:valueFrom="0" android:valueTo="180" /> <!-- Half-way through the rotation (see startOffset), set the alpha to 0. --> <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

 <!-- Before rotating, immediately set the alpha to 0. --> <alpha android:duration="0" android:propertyName="alpha" android:valueFrom="1.0" android:valueTo="0.0" /> <!-- Rotate. --> <rotate android:duration="@integer/card_flip_time_full" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:propertyName="rotationY" android:valueFrom="180" android:valueTo="0" /> <!-- Half-way through the rotation (see startOffset), set the alpha to 1. --> <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. --> <rotate android:duration="@integer/card_flip_time_full" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:propertyName="rotationY" android:valueFrom="0" android:valueTo="-180" /> <!-- Half-way through the rotation (see startOffset), set the alpha to 0. --> <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.

+4
source share
1 answer

If "Objacter Animation" means ObjectAnimator, then this is not supported by lib compatibility. Instead, you should take a look at the NineOldAndroid library, which brings the Honeycomb + animations API to older platforms: http://nineoldandroids.com/

0
source

All Articles