novoda / landing-strip

Your simple sliding viewpager tab strip: a landing strip without the fluff!
Apache License 2.0
13 stars 5 forks source link

Remove too many listeners bug #23

Closed niamh-power closed 7 years ago

niamh-power commented 7 years ago

Problem

Using this library in an external project we have found out that we receive lots of events from the onGlobalLayoutListener

This is causing the application to trigger events for views that don't exist anymore and lingering listeners from views that never get detached

Solution

Paired with @joetimmins @zegnus

ouchadam commented 7 years ago

nice find! I never thought about the case where notifydatachanged would be called more than once