-
Amir Hardon authored
Before this PR AndroidView's gestureRecognizers field was a list of gesture recognizers. This was problematic as when the widget was rebuilt with the same gesture recognizer instances we would try to re-join the recognizers to a gesture arena team and crash (as a OneSeqeunceGestureRecognizer team can only be set once). With this change, we instead take a set of factories. This allows AndroidView to create the gesture recognizers just before adding them to the team, and thus be sure that they are only added once to a team. The factories are identified by the type of the object they create, this allows AndroidView to know when it is given an equivalent set of gesture recognizer factories, and do nothing in that case.