confetti icon indicating copy to clipboard operation
confetti copied to clipboard

unable to show confetti on click of button

Open sonawanevip opened this issue 5 years ago • 1 comments

`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?

sonawanevip avatar Dec 20 '19 08:12 sonawanevip

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.

jinatonic avatar Dec 20 '19 17:12 jinatonic