android - How to Reverse Fragment Animations on BackStack? -


i thought system reverse animations on backstack when button pressed when using fragments using following code:

fragmentmanager fm = getfragmentmanager(); fragmenttransaction ft = fm.begintransaction(); ft.setcustomanimations(r.anim.slide_in, r.anim.hyperspace_out); ft.replace(r.id.viewcontainer, new class(), "layout").addtobackstack(null).commit(); 

according android documentation custom animation:

change:

ft.setcustomanimations(r.anim.slide_in, r.anim.hyperspace_out); 

to:

ft.setcustomanimations(r.anim.slide_in, r.anim.hyperspace_out, r.anim.hyperspace_in, r.anim.slide_out ); 

and backstack animates - in reverse!!


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -