Thread
#compose
    j

    Jakub Valigura

    2 years ago
    I am trying to show a Compose Dialog on Button click in a Fragment which uses XML resource as a View. When I call openDialog(…) I get the following exception java.lang.IllegalStateException: Composition requires an active composition context. Is it even possible to mix XML and Compsoe together or was it not implemented yet? Thanks! 🙂
    Luca Nicoletti

    Luca Nicoletti

    2 years ago
    It’s not implemented yet
    A
    @Composable
    function need to be called inside the
    setContent
    function
    You can’t call a composable wherever you want
    j

    Jakub Valigura

    2 years ago
    Ok, thanks 🙂
    r

    Ryan Mentley

    2 years ago
    If you're willing to put up with some awkwardness, there's a
    ViewGroup.setContent
    extension function, though, that would allow you to do that