Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Transition Animation Between Activities

I am calling an Activity B from Activity A, which contains a Video View using the following code :

Intent intent = new Intent(this, B.class); intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); startActivityForResult(intent, 0); 

I am using Intent.FLAG_ACTIVITY_NO_ANIMATION to avoid transition animation while new activity is being called. But its not working for me and a black screen is coming while the transition. Is there any way to avoid this transition animation and black screen, so that the user will not come to know that the video view is being called in a new screen?

like image 248
Timson Avatar asked Mar 07 '12 05:03

Timson


People also ask

How do I turn off screen animation?

Open Settings . Scroll down and select Accessibility. Scroll down to Display and tap Text and display. Tap the toggle switch for Remove animations to turn it on.

What is transition animation in Android?

Android's transition framework allows you to animate all kinds of motion in your UI by simply providing the starting layout and the ending layout.

How do I turn off animation remover?

To access the Accessibility features on your Android device open the Settings app . In the Settings app, select Accessibility from the list. Now scroll down to the Display section and select Remove Animations to set the toggle switch to On.


1 Answers

Try calling:

Intent intent = new Intent(this, B.class); intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); startActivityForResult(intent, 0); overridePendingTransition(0,0); //0 for no animation 
like image 90
technofunc Avatar answered Oct 01 '22 08:10

technofunc