I am following the tutorial below to add confetti.
final KonfettiView konfettiView = (KonfettiView)findViewById(viewKonfetti);
konfettiView.build()
.addColors(Color.RED, Color.GREEN)
.setSpeed(1f, 5f)
.setFadeOutEnabled(true)
.setTimeToLive(2000L)
.addShapes(Shape.RECT, Shape.CIRCLE)
.setPosition(0f, -359f, -359f, 0f)
.stream(200, 5000L);
I want the confetti to appear from top right corner instead of top left. What values should I put in the setPosition
method? How does this method work?
I am following this https://github.com/DanielMartinus/Konfetti but there is not much information about the methods and their parameters.