Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slow down sliding animation between android activities?

I know that android automatically uses sliding animations if you open and close activities. Then they slide from left to right and fill the screen (or from right to left). The thing is that the animation is quite fast... it is visible on the emulator but it is barely noticeable on the phone itself. I am wondering if there is any way to slow down this animation so it would definitely be seen that the view is sliding.

like image 362
dominos Avatar asked Nov 01 '10 17:11

dominos


1 Answers

First prevent the default animation (Slide in from the right) with the Intent.FLAG_ACTIVITY_NO_ANIMATION flag in your intent.

ie.,

Intent myIntent = new Intent(context, MyActivity.class);
myIntent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
context.startActivity(myIntent);

Now you can load your own custom animation. Refer this link to know how to animate your activity's in and out.

like image 177
JiTHiN Avatar answered Oct 13 '22 18:10

JiTHiN