1

I want change default transaction animation for Android Navigation Component like this:

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
    <!-- Customize your theme here. -->
    <item name="enterAnim">@anim/slide_in_left</item>
    <item name="exitAnim">@anim/slide_out_left</item>
    <item name="popEnterAnim">@anim/slide_in_left</item>
    <item name="popExitAnim">@anim/slide_out_left</item>
</style>

In this case, it didn't work. Do you have any idea?

Yaugen Slizh
  • 121
  • 5

1 Answers1

0

Release notes of Navigation 2.4.0-alpha02 says:

When inflating an element via XML, animation attributes can use attributes pulled from your theme using the app:enterAnim="?attr/transitionEnter" syntax

So, yes it is now possible to set a default animation for your navigation's actions.

Mbt925
  • 1,317
  • 1
  • 16
  • 31