Custom Flip animation between fragments android support package -
i trying find out how create flip animation between 2 fragments.
i have tried cardflip training guide, don't seem able accomplish it. using android back upwards bundle , set tween animation, not successful.
how implement flipping animations between fragment?
here first 2 xml created guide, maybe see if doing wrong. screen_flip_left_in.xml:
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" > <!-- before rotating, set alpha 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 rotation (see startoffset), set alpha 1. --> <alpha android:valuefrom="0.0" android:valueto="1.0" android:propertyname="alpha" android:startoffset="@integer/card_flip_time_half" android:duration="1" /> </set>
screen_flip_left_out.xml:
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" > <!-- rotate. --> <rotate android:valuefrom="0" android:valueto="180" android:propertyname="rotationy" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:duration="@integer/card_flip_time_full" /> <!-- half-way through rotation (see startoffset), set alpha 0. --> <alpha android:valuefrom="1.0" android:valueto="0.0" android:propertyname="alpha" android:startoffset="@integer/card_flip_time_half" android:duration="1" /> </set>
android:propertyname objectanimator (honeycomb+) animations, not view animations gingerbread. card flip animation possible using honeycomb animator api's. created fork of back upwards library allow using animator apis nineoldandroids fragment transitions. utilize animator-transition branch of github project. 1 time have modified back upwards library @ http://developer.android.com/training/animation/cardflip.html create animator xml.
android
No comments:
Post a Comment