diff --git a/samples/user-interface/predictiveback/src/main/java/com/example/platform/ui/predictiveback/PBTransition.kt b/samples/user-interface/predictiveback/src/main/java/com/example/platform/ui/predictiveback/PBTransition.kt index 208452c1..272e5ab2 100644 --- a/samples/user-interface/predictiveback/src/main/java/com/example/platform/ui/predictiveback/PBTransition.kt +++ b/samples/user-interface/predictiveback/src/main/java/com/example/platform/ui/predictiveback/PBTransition.kt @@ -96,7 +96,7 @@ class PBTransition : Fragment() { callback.isEnabled = true } - this.requireActivity().onBackPressedDispatcher.addCallback(callback) + this.requireActivity().onBackPressedDispatcher.addCallback(viewLifecycleOwner, callback) binding.apply { longText.movementMethod = ScrollingMovementMethod();