Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
jb...@google.com <jb...@google.com>
sa...@google.com <sa...@google.com>
sa...@google.com <sa...@google.com>
jb...@google.com <jb...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
gs...@gmail.com <gs...@gmail.com> #5
🙏
na...@google.com <na...@google.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.fragment:fragment:1.6.0-alpha09
Description
Component used: Fragment
Version used: 1.5.0-rc01
Tryin to attach an https://issuetracker.google.com/issues/149173280#comment5
OnBackPressedDispatcher
to aDialogFragment
'sDialog
, I have to cast the returnedDialog
to aComponentDialog
to be able to access the back dispatcher. I've also seen this provided as an example hereGiven that requireActivity() ), why is
ComponentActivity
is a part of the fragment API throughFragmentActivity
(e.g.ComponentDialog
not a part of aDialogFragment
API inrequireDialog()
andonCreateDialog()
As extra information, there's a possible alternative to casting the dialog, by using
View.findViewTreeOnBackPressedDispatcherOwner()