Open paulkugaev opened 5 years ago
@paulkugaev How did you solve that? I just realised changing configuration keeps calling afterTextChanged method until it crashes the app. I need a solution.
@saintjab the whole code is aimed on reconfiguring toolbar layout after the view tree has been inflated. removing GlobalLayoutListener (which leaks) leads to broken functionality. the easiest workaround - not using this library until @RaviKoradiya fixes the issue and instead creating a regular TextView inside Toolvar coz u can consider Toolbar as a regular FrameLayout
Your solution has a memory leak when using databinding. You should either mention that we have to set GlobalLayoutListener to null at every configuration change or remove it from text's viewTreeObserver