Fixed
Status Update
Comments
jb...@google.com <jb...@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.
tp...@gmail.com <tp...@gmail.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
jb...@google.com <jb...@google.com> #4
It is stable in the releases I referenced above.
il...@google.com <il...@google.com> #5
Fragment 1.6.1 will update the dependency of Activity to 1.7.2 so you'll get this improvement by default. As mentioned above, you can add a dependency on Activity 1.7.2 right now to fix the issue as a workaround until that release comes out.
Description
Component used: Fragment, ComponentDialog
Version used: 1.6.0
Devices/Android versions reproduced on:
After upgrading androidx.fragment to 1.6.0 from 1.5.5, I am unable to compile when attempting to subclass ComponentDialog. An error is generated that says:
If I convert
MyComponentDialog
to Java, it works as expected.I copied the source code for ComponentDialog and commented out the references to ViewTreeLifecycleOwner (since I don’t have access to that) and found the compiler generated the same error for ComponentDialog itself.
In ComponentDialog, if I replace:
with
the compiler no longer complains and the class can be extended.
The problem can be easily demonstrated with the following Kotlin code:
Other than converting
MyComponentDialog
to Java, I could not find a solution.