Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

// 可以混合使用,只需要加两行代码就可以在XpopWindow中直接使用Compose代码了 #1207

Open
wzgl5533 opened this issue Mar 11, 2024 · 1 comment

Comments

@wzgl5533
Copy link

          // 可以混合使用,只需要加两行代码就可以在XpopWindow中直接使用Compose代码了
class XDialog(context:Context):BasePopupView{

      //关注这一行就行了
     init  {
           id=android.R.id.content
           setViewTreeLifecyceOwner(context as AppCompatActivity) // 如果在Compose中使用这里要传Compose的上下文XXX.current
           setViewTreeSavedStateRegisterOwner(context as AppCompatActivity)
       }
}

Originally posted by @yongjie520 in #1158 (comment)

@wzgl5533
Copy link
Author

没看懂,这是需要新建类 继承BasePopupView吗?有没有代码样例

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant