Coder Social home page Coder Social logo

Comments (4)

wzgl5533 avatar wzgl5533 commented on September 16, 2024

希望大佬哪天可以慢慢推出兼容compose的工具

from xpopup.

yongjie520 avatar yongjie520 commented on September 16, 2024

// 可以混合使用,只需要加两行代码就可以在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)
       }
}

from xpopup.

yongjie520 avatar yongjie520 commented on September 16, 2024

希望增加支持 jetpack compose,谢谢。 现在在xml 使用 会崩溃。

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

from xpopup.

initchen avatar initchen commented on September 16, 2024

// 可以混合使用,只需要加两行代码就可以在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)
       }
}

PartShadowPopupView怎么处理atView呢

from xpopup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.