confetti icon indicating copy to clipboard operation
confetti copied to clipboard

[CRASHED] Views added to a FragmentContainerView must be associated with a Fragment.

Open shilena91 opened this issue 4 years ago • 0 comments

This is my onCreateView

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
       val view = inflater.inflate(R.layout.fragment_home, container, false)
       viewContainer = container
}

My app crashed everytime I call this:

confettiyManager = CommonConfetti.rainingConfetti(viewContainer, intArrayOf(Color.BLACK, Color.RED, Color.GREEN, Color.BLUE, Color.CYAN, Color.YELLOW, Color.MAGENTA)).infinite()

Logcat shows:

Views added to a FragmentContainerView must be associated with a Fragment. View com.github.jinatonic.confetti.ConfettiView{3bdc989 V.ED..... ......I. 0,0-0,0} is not associated with a Fragment.

Any help or hint is appreciated 🙏

shilena91 avatar Nov 13 '20 10:11 shilena91