Android: What's wrong with my fragment transition animation? -


i need plain slide in , slide out animation fragment transition, below code: slide_in_left.xml:

<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareinterpolator="true"> <translate     android:fromxdelta="-100%"     android:toxdelta="0%"     android:fromydelta="0%"     android:toydelta="0%"     android:duration="700"> </translate> </set> 

slide_out_right.xml:

<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareinterpolator="false"> <translate     android:fromxdelta="0%" android:toxdelta="100%"     android:fromydelta="0%" android:toydelta="0%"     android:duration="700"> </translate> </set> 

the code used:

somefragment frag = somefragment.newinstance(foo); fragmenttransaction ft = getsupportfragmentmanager().begintransaction(); ft.setcustomanimations(r.anim.slide_in_left, r.anim.slide_out_right); ft.replace(r.id.the_fragment, frag); ft.addtobackstack(null);  ft.commit(); 

the result looks stranges, when transition starts, current fragment disappears without animation, entering fragment comes(from left) scrolling paper. what's wrong animation xml code?

thanks!

getsupportfragmentmanager() means using compatibility package fragments, guess. have same problem, no animation happening @ all.

see http://groups.google.com/group/android-developers/browse_thread/thread/5ef5ba1be9f40c56/a846578d91a032c0?hide_quotes=yes#msg_8ca017c473818a04


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

c# - how to write client side events functions for the combobox items -

ssh client with paramiko (python) -