OnView Destroyed is called as soon as the ProfileDialogFragment1 is opened. I guess this problem is caused by registering to lifecycle of fragment parent manager.
private fun registerFragmentLifecycleCallbacksIfNeeded(fragment: Fragment) {
if (fragmentLifecycleCallbacks != null) {
return
}
val fragmentManager = fragment.parentFragmentManager.also { fm ->
this.fragmentManager = fm
}
fragmentLifecycleCallbacks = ClearOnDestroy().also { callbacks ->
fragmentManager.registerFragmentLifecycleCallbacks(callbacks, false)
}
}
Hi, I'm using the library with navigation component. I noticed a problem. This issue occurs when pop behavior is defined.
OnView Destroyed is called as soon as the ProfileDialogFragment1 is opened. I guess this problem is caused by registering to lifecycle of fragment parent manager.
You can find sample code here. issue.zip