Wondering if there is a way to create a reusable set of the animations for the nav graph. Something like a style that contains all of the animation properties rather than repeating the same ones over and over.
What I have:
<action
android:id="@+id/toFragmentA"
app:destination="@id/fragmentA"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right" />
<action
android:id="@+id/toFragmentB"
app:destination="@id/fragmentB"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right" />
<action
android:id="@+id/toFragmentC"
app:destination="@id/fragmentC"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right" />
<action
android:id="@+id/toFragmentD"
app:destination="@id/fragmentD"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right" />
<action
android:id="@+id/toFragmentE"
app:destination="@id/fragmentE"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right" />
What I would like to have
<action
android:id="@+id/toFragmentA"
app:destination="@id/fragmentA"
app:anim="@anim/slideInOut" />
<action
android:id="@+id/toFragmentB"
app:destination="@id/fragmentB"
app:anim="@anim/slideInOut" />
<action
android:id="@+id/toFragmentC"
app:destination="@id/fragmentC"
app:anim="@anim/slideInOut" />
<action
android:id="@+id/toFragmentD"
app:destination="@id/fragmentD"
app:anim="@anim/slideInOut" />
<action
android:id="@+id/toFragmentE"
app:destination="@id/fragmentE"
app:anim="@anim/slideInOut" />
With a large nav graph reducing this repeated animation setup would make it much more manageable.