Coder Social home page Coder Social logo

Comments (3)

kpetriv avatar kpetriv commented on June 8, 2024 1

I'm not sure if it fits your case, but it works when doing the balloons with a state in the parent composable.

enum class Tutorial(val step: Int?) {
 None(0),
 ShowX(1),
 ShowY(2),
 Close(null),
}

Then have the state at the top

var tutorialStep by remember { mutableStateOf(Tutorial.NONE) }

Implement the logic for increasing the steps and have helper method Tutorial.next()

Add the LaunchedEffect at the end of the parent composable

LaunchedEffect(tutorialStep) {
        if (tutorialStep == Tutorial.NONE) tutorialStep = tutorialStep.next()
    }

When you want to skip the tutorial or close it at the very end all you need to do is set the tutorialStep = null

At least this works for me as I am building a sequence of balloons and I think this should be slightly less bulky than all the conditional statements you have there and easier to understand

from balloon.

Monabr avatar Monabr commented on June 8, 2024

I found on that there is 2 setOnBalloonDismissListener exists: for Balloon and for BalloonWindow, and the second one is not working. I make it work by using listener for the first one. However the docs tells nothing about that. This happened because my deep dive into source code but normally I should be able to get this info from docs.

from balloon.

Alembertcn avatar Alembertcn commented on June 8, 2024

The kotlin version of our project is only 1.5.0 but your latest version is 1.9.0. What if you fix some bugs in the latest version and I have to use the older version

from balloon.

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.