Slow down sliding animation between android actions?

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

+6
android android-activity animation
source share
2 answers

First, prevent the default animation (Slide on the right) with the Intent.FLAG_ACTIVITY_NO_ANIMATION flag in your intentions.

t.,

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

Now you can upload your own animation. Refer to the link to find out how to revitalize your activity.

+3
source share

you can specify the duration of the animation in the .xml animation in res/anim , for example, to drop to the left:

 <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false" > <translate android:duration="500" android:fromXDelta="0%" android:fromYDelta="0%" android:toXDelta="-100%" android:toYDelta="0%" /> </set> 
+1
source share

All Articles