You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am create BottomSheetDialogFragment with using this libs
Example view binding private val binding: BottomAccountDialogBinding by viewBinding(BottomAccountDialogBinding::bind)
In onCreateView returned view inflater.inflate(R.layout.bottom_account_dialog, container, false)
I am open new fragment of dialog and after going back on dialog fragment using popBackStack, onCreateView method is called again but binding not cleared
I am see what onDestroyView is called but ViewBindingProperty not cleared my view binding @MainThread public override fun clear() { mainHandler.post { viewBinding = null } }
This method not called for my BottomAccountDialogBinding
I'am see what DialogFragmentViewBindingProperty using fragment lifecycle but not view lifecycle if (thisRef.showsDialog) { return thisRef } else { return thisRef.viewLifecycleOwner }
I'am tried change showsDialog parameter for my dialog fragment befor called binding in onViewCreated and in onDestroyView method and this is cleared binding else arises this problem
I think it's worth it return lifecycle for DialogFragmentViewBindingProperty
The text was updated successfully, but these errors were encountered:
Doesn't work for me. Tried versions 1.4.7 and 1.5.0. If dialog fragment is used with showsDialog = true, viewBinding keeps references to old views after pop dialog from back stack.
I am create
BottomSheetDialogFragment
with using this libsExample view binding
private val binding: BottomAccountDialogBinding by viewBinding(BottomAccountDialogBinding::bind)
In
onCreateView
returned viewinflater.inflate(R.layout.bottom_account_dialog, container, false)
I am open new fragment of dialog and after going back on dialog fragment using
popBackStack
,onCreateView
method is called again but binding not clearedI am see what
onDestroyView
is called butViewBindingProperty
not cleared my view binding@MainThread public override fun clear() { mainHandler.post { viewBinding = null } }
This method not called for my
BottomAccountDialogBinding
I'am see what
DialogFragmentViewBindingProperty
using fragment lifecycle but not view lifecycleif (thisRef.showsDialog) { return thisRef } else { return thisRef.viewLifecycleOwner }
I'am tried change showsDialog parameter for my dialog fragment befor called binding in
onViewCreated
and inonDestroyView
method and this is cleared binding else arises this problemI think it's worth it return lifecycle for
DialogFragmentViewBindingProperty
The text was updated successfully, but these errors were encountered: