How to animation between activities Intent animations | Animations between activities open

Hey, whats up Guys welcome back to this new post. In this post, we will learn about how we can make animation transaction in an Android layout using simple intent.

So first we need to know about that why we need to add transaction animation in intent like this kind of animation...


So we can add this type of animation transaction to our layout so it gives an awesome effect to our Android UI so let's start...

Here is the Video tutorial for this post

1. Create a new project. 

1. Create a new project in Android Studio from File ⇒ New Project and select Empty Activity from templates.or you can choose your existing project. 

2. First, open project level gradle file and paste this code.

2.1 Now open app level gradle file and paste this code and sync the project.

3. Now we need to make a new activity so we can open that activity using this animation so create a new activity.

4. Now let's create some buttons and intent to open the activity this is simple intent to open an activity just past it.


5. Ok so we create the UI to open the activity but right now it will open the activity with simple default animation so we need to make that our custom animation now copy this static import line and paste this in your java file under import section.

import static;

5.1 now copy this line and past this under all of your startActivity function which activity you want to animate.

customType(MainActivity.this,"here is string name");

Note: as you can see here it has the code "here is string name" you need to change this line with the bellow text according to your choice.


6. So in this way, we can add some simple animation without doing so many lines of codes so let's see the full code of my java file.

Click here to see the actual GitHub repository -> intentanimation

Watch the Video Tutorial of this post here

Thanks for your time I will come back with a new post