Closed jassielcastro closed 3 years ago
Hey @jassielcastro, thanks for flagging this. Could you try calling '.hide()' in your calling Activity's 'onPause' or 'onStop' lifecycle method?
@kpmmmurphy the crash still, because at the moment of calling 'onPause' or 'onStop' the animation of removing the view has not yet finished:
// This is the part of your code that still doesn't finish removing the view.
public static void clearCurrent(...) {
...
ViewCompat.animate(childView).alpha(0).withEndAction(getRemoveViewRunnable(childView));
...
}
And when the new Activity is launched, the Alert is still visible.
Hey @jassielcastro, more then happy to review a PR with a fix for this if you can implement one!
Sure @kpmmmurphy let me take some time!
@kpmmmurphy you already have a listener:
fun setOnHideListener(listener: OnHideAlertListener): Alerter {
My bad... Im using a very old version of your library.
As mentioned in the title, any app that tries to launch a new activity or change fragment while the Alert is being displayed, the app will crash... A solution we found was to put a postDelay while Alerter.isShowing()
but there is no way to add a callBack in the Alerter.hide() method when the hide is finished? This to know when the Alerter is already removed.