Making animations with transitions

To animate transactions between fragments, it's needed to assign some animation resources to the transaction instance. As you remember, after we begin the fragment transaction, we get one transaction instance. We can then access this instance and execute the method as follows:

Or, we can use this method:

Here, each parameter represents the animation used in this transaction. We can define our own animation resources or use one of the predefined ones: