Skip to content

zsperske/ViewTreeLifecycleOwnerDialogBug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ViewTreeLifecycleOwnerDialogBug

This repo contains a reproduction of an issue with the AppCompatDialog & Componentdialog. It shows that the ComponentDialog does not set the ViewLifecycleTreeOwner correctly when setContentView is called. AppCompatDialog (the subclass of ComponentDialog) does not call super.setContentView and instead calls a delegate which never reaches ComponentDialog.

See MyDialog.kt

button?.setOnClickListener {
      // setContentView above should have reached ComponentDialog to initialize the ViewTreeLifeCycleOwner
      ViewTreeLifecycleOwner.get(view)!! // causes crash
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages