I import the "Motion" sample as it and My tried with "Navigation --> Shared Element" will crash on emulator v16 with the following trace:
java.lang.UnsupportedOperationException: FragmentContainerView does not support Layout Transitions or animateLayoutChanges="true".
at androidx.fragment.app.FragmentContainerView.setLayoutTransition(FragmentContainerView.java:104)
at androidx.transition.ViewGroupUtilsApi14.suppressLayout(ViewGroupUtilsApi14.java:70)
at androidx.transition.ViewGroupUtils.suppressLayout(ViewGroupUtils.java:62)
static void suppressLayout(@NonNull ViewGroup group, boolean suppress) {
if (Build.VERSION.SDK_INT >= 29) {
group.suppressLayout(suppress);
} else if (Build.VERSION.SDK_INT >= 18) {
hiddenSuppressLayout(group, suppress);
} else {
// This will call viewGroup.setLayoutTransition(LayoutTransition) and crash.
ViewGroupUtilsApi14.suppressLayout(group, suppress);
}
}
I'm not seeking for a fix as both are current specification, but I wonder if changing the implementation can be trivial to be done?