Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to show confetti on click of button #55

Open
sonawanevip opened this issue Dec 20, 2019 · 1 comment
Open

unable to show confetti on click of button #55

sonawanevip opened this issue Dec 20, 2019 · 1 comment

Comments

@sonawanevip
Copy link

sonawanevip commented Dec 20, 2019

`int[] confettiColors = new int[]{R.color.red, R.color.blue, R.color.green, R.color.black, R.color.orange, R.color.darkergray};

ConfettiSource confettiSource = new ConfettiSource(linearLayout.getWidth(),
linearLayout.getHeight());

CommonConfetti.rainingConfetti(linearLayout, confettiSource, confettiColors ).infinite();`

i have done this code ....is that sufficient for showing confetti?

@jinatonic
Copy link
Owner

it depends on when you do this, debug and check what's your linearLayout.getWidth(). my theory is that you are calling this before the linearlayout gets measured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants