I've follow the docs to implement shared view transitions with the new Navigation component and it is not working. This is what I have:
Fragment A has this code to call fragment B
val extras = FragmentNavigatorExtras(
taskNameInput to "taskName")
findNavController().navigate(R.id.action_aFragment_to_BFragment,
null), // Bundle of args
null, // NavOptions
extras)
Taking a look to the layout, the id has the transition name set as follows:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/taskNameInput"
android:transitionName="taskName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
...
Then FragmentB has the following view in the layout:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/taskNameInput"
android:transitionName="taskName"
android:layout_width="0dp"
android:layout_height="wrap_content"
...>
When going from fragmentA to fragmentB, the enter animation is played but not the sharedView transition. Any clue? Thanks