// 可以混合使用,只需要加两行代码就可以在XpopWindow中直接使用Compose代码了
Opened this issue · 1 comments
wzgl5533 commented
// 可以混合使用,只需要加两行代码就可以在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 commented
没看懂,这是需要新建类 继承BasePopupView吗?有没有代码样例